0
次のサンプルでは、libでデータを取得できませんre
何が間違っているのですか?あなたは私のスクリプトでReライブラリを使用しているときにエラーが発生しました
reg = r'style5\(\);</script>(.*?)<script type="text/javascript">style6'
を持って
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import urllib
import re
def getData():
res=urllib.urlopen("http://www.quanshuwang.com/book/0/149/34333.html").read()
html = res.decode("gbk").encode("utf-8")
reg = r'style5\(\);</script>(.*?)<script type="text/javascript">style6'
print re.findall(reg,html)
getData()
あなたのエラーは何を削除する必要がありますか? – Hooli
"style5();"と "