[過去ログ]
くだすれPython(超初心者用) その44【Ruby禁止】 (1002レス)
くだすれPython(超初心者用) その44【Ruby禁止】 http://mevius.5ch.net/test/read.cgi/tech/1563969768/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
必死チェッカー(本家)
(べ)
自ID
レス栞
あぼーん
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
739: デフォルトの名無しさん [sage] 2019/09/22(日) 21:26:15.85 ID:z+deZx/y https://i.imgur.com/IUPQ1Td.png https://pastebin.com/V0gkJuwd ↑を実行すると 1件目のデータを取得中です https://https://example.com/test/?p=1 regexp_20190922212309.txtに出力しました 2件目のデータを取得中です https://https://example.com/test/?p=2 Traceback (most recent call last): File "C:\Python\test.py", line 31, in <module> html = html.fromstring(str(raw_html)) AttributeError: 'HtmlElement' object has no attribute 'fromstring' ↑1件目は問題なく動くのに2件目でAttributeErrorが出るのですがどうしてですか? http://mevius.5ch.net/test/read.cgi/tech/1563969768/739
740: デフォルトの名無しさん [sage] 2019/09/22(日) 21:28:24.85 ID:z+deZx/y >>739 画像貼り間違えた https://i.imgur.com/FAKwZUF.png http://mevius.5ch.net/test/read.cgi/tech/1563969768/740
744: デフォルトの名無しさん [sage] 2019/09/22(日) 23:27:02.07 ID:z+deZx/y >>743 ありがとうございます まさにそれでした! html_2 = html.fromstring(str(raw_html)) にしたら動作しました http://mevius.5ch.net/test/read.cgi/tech/1563969768/744
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.030s