国土数値情報を一括DLしようとしたがうまくできん
https://qiita.com/mits003/items/2c8c77514a09aee99cc0
これを参考にした
探検
おそらくpythonで躓いた
■ このスレッドは過去ログ倉庫に格納されています
1デフォルトの名無しさん
2021/11/11(木) 20:20:25.05ID:M474n1nU2デフォルトの名無しさん
2021/11/11(木) 20:22:22.81ID:M474n1nU C:\Users\cucum>python mlit_ksj_dl.py https://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-L03-a.html
C:\Users\cucum\mlit_ksj_dl.py:50: DeprecationWarning: executable_path has been deprecated, please pass in a Service object
driver = webdriver.Chrome(executable_path=DRIVER_PATH, chrome_options=options)
C:\Users\cucum\mlit_ksj_dl.py:50: DeprecationWarning: use options instead of chrome_options
driver = webdriver.Chrome(executable_path=DRIVER_PATH, chrome_options=options)
Traceback (most recent call last):
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 74, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] 指定されたファイルが見つかりません。
C:\Users\cucum\mlit_ksj_dl.py:50: DeprecationWarning: executable_path has been deprecated, please pass in a Service object
driver = webdriver.Chrome(executable_path=DRIVER_PATH, chrome_options=options)
C:\Users\cucum\mlit_ksj_dl.py:50: DeprecationWarning: use options instead of chrome_options
driver = webdriver.Chrome(executable_path=DRIVER_PATH, chrome_options=options)
Traceback (most recent call last):
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 74, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] 指定されたファイルが見つかりません。
3デフォルトの名無しさん
2021/11/11(木) 20:22:37.48ID:M474n1nU During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\cucum\mlit_ksj_dl.py", line 115, in <module>
dl_dir = file_dl(DRIVER_PATH)
File "C:\Users\cucum\mlit_ksj_dl.py", line 50, in file_dl
driver = webdriver.Chrome(executable_path=DRIVER_PATH, chrome_options=options)
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__
super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 90, in __init__
self.service.start()
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 84, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home
Traceback (most recent call last):
File "C:\Users\cucum\mlit_ksj_dl.py", line 115, in <module>
dl_dir = file_dl(DRIVER_PATH)
File "C:\Users\cucum\mlit_ksj_dl.py", line 50, in file_dl
driver = webdriver.Chrome(executable_path=DRIVER_PATH, chrome_options=options)
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__
super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 90, in __init__
self.service.start()
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 84, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home
4デフォルトの名無しさん
2021/11/11(木) 20:23:19.70ID:M474n1nU コマンドプロンプトに入力すると↑が出て解説通りにならん
何がダメなのか教えてくださいm(__)m
何がダメなのか教えてくださいm(__)m
5デフォルトの名無しさん
2021/11/11(木) 20:57:16.41ID:M474n1nU C:\Users\cucum>python mlit_ksj_dl.py https://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-L03-a.html
python: can't open file 'C:\Users\cucum\mlit_ksj_dl.py': [Errno 2] No such file or directory
こっちだった
解説通りにやるとpyファイルにたどり着かないです
python: can't open file 'C:\Users\cucum\mlit_ksj_dl.py': [Errno 2] No such file or directory
こっちだった
解説通りにやるとpyファイルにたどり着かないです
6デフォルトの名無しさん
2021/11/11(木) 22:02:46.50ID:1oMtSCiX pyファイルはどこにあるんだ
7デフォルトの名無しさん
2021/11/11(木) 22:18:32.40ID:M474n1nU8デフォルトの名無しさん
2021/11/11(木) 22:32:09.34ID:1oMtSCiX >>7
じゃあそのフォルダにcdしてからさっきのコマンド実行しないと
じゃあそのフォルダにcdしてからさっきのコマンド実行しないと
9デフォルトの名無しさん
2021/11/11(木) 23:11:27.88ID:M474n1nU10デフォルトの名無しさん
2021/11/11(木) 23:15:32.68ID:M474n1nU Win 10
pyhton 3.9 DL済
ChromeDriver 93.04577 DL済
pip install selenium 実行
コマンドプロンプトでやってる
解説だと「$ python3 mlit_ksj_dl.py ダウンロードしたいページのURL」だけどコマンドプロンプトに入力してもうまくいかないから「python mlit_ksj_dl.py ダウンロードしたいページのURL」にしてる
そうすると>>2,3が表示される
pyhton 3.9 DL済
ChromeDriver 93.04577 DL済
pip install selenium 実行
コマンドプロンプトでやってる
解説だと「$ python3 mlit_ksj_dl.py ダウンロードしたいページのURL」だけどコマンドプロンプトに入力してもうまくいかないから「python mlit_ksj_dl.py ダウンロードしたいページのURL」にしてる
そうすると>>2,3が表示される
11デフォルトの名無しさん
2021/11/11(木) 23:17:45.05ID:M474n1nU フォルダWebDriverには.gitignoreとchromedriver.exeがはいってる
.exeは起動せずにコマンド入力してる
.exeは起動せずにコマンド入力してる
12デフォルトの名無しさん
2021/11/11(木) 23:26:32.96ID:1oMtSCiX >>9
もしC:\Users\cucumにいるまま実行したいなら
python .\mlit-ksj-dl-tool-main\mlit-ksj-dl.py https://〜
だな
あとここだと個別にスレ立てると皆回答してくれないから↓辺りで聞くといいよ
【まず1嫁】くだすれPython(超初心者用) その55
https://mevius.5ch.net/test/read.cgi/tech/1633070807/
もしC:\Users\cucumにいるまま実行したいなら
python .\mlit-ksj-dl-tool-main\mlit-ksj-dl.py https://〜
だな
あとここだと個別にスレ立てると皆回答してくれないから↓辺りで聞くといいよ
【まず1嫁】くだすれPython(超初心者用) その55
https://mevius.5ch.net/test/read.cgi/tech/1633070807/
13デフォルトの名無しさん
2021/11/11(木) 23:47:56.96ID:M474n1nU14デフォルトの名無しさん
2021/11/11(木) 23:59:56.43ID:J6sKotQS スレ削除依頼出せ
2021/11/12(金) 09:14:37.05ID:bLCSn2ms
依頼出しました
16デフォルトの名無しさん
2022/09/07(水) 00:54:37.70ID:6N86wOEk 削除依頼出せ
2022/09/07(水) 01:08:52.50ID:8NMkvrFG
この板では、単発の質問スレを立てることは禁止です!
速やかに、このスレの削除依頼を出してください
速やかに、このスレの削除依頼を出してください
NGNG
真・スレッドストッパー。。。( ̄ー ̄)ニヤリッ
■ このスレッドは過去ログ倉庫に格納されています
ニュース
- アメリカ、入国時に「日本人を含む外国人観光客の最大5年分のSNS履歴の提出」義務化 過去10年間に使用のメールアドレスや電話番号等も [Hitzeschleier★]
- 【おこめ】「有能だったんじゃ」おこめ券で批判殺到の鈴木農水大臣…ネットでは前任の“進次郎再評価” [ぐれ★]
- 【中国外務省】日本への渡航自粛を再度呼びかけ 今度は「地震発生」を理由に [ぐれ★]
- 「もうキモくてキモくて…」29歳女性が語る“おぢアタック”の実態。「俺ならイケるかも」年下女性を狙う勘違い中年男性に共通点が★3 [Hitzeschleier★]
- 【芸能】デパートで見つけたランドセルが衝撃価格! つまみ枝豆「どこかで規制しないと」に共感の声殺到 「全て同感」「高すぎます」★2 [冬月記者★]
- 【速報】年収の壁の自民案判明、26年は168万円 [蚤の市★]
- 日本人、タイとカンボジアの戦争に興味がなさすぎる。高市もなんか言えよ [811796219]
- 日本人、世界で最もブランドに興味なし🇯🇵 [462275543]
- 【悲報】たぬかなが渡邊渚を壮絶バッシング 「グラビア出したあたりから臭いな~と思ってたが激臭になってたわ。中居は悪くない」 [455031798]
- 【悲報】鈴木農水大臣、国民から「こいつひょっとしてアホなんじゃね?」と思われ始めてしまうwww [793117252]
- 日本に旅行来てる中国人減ったとか言ったの誰だよ
- 自閉症児の父親「中絶しておけば良かった。 家族が欲しかったのに、手に入れたのは人間たまごっち」 [777114754]
