>>> url="http://apk.gfan.com/Product/App45021.html"
>>> result=html.content
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'html' is not defined
>>> html=requests.get(url)
>>> result=html.content
>>> pattern=re.compile('版 本 号(.+?)</li>')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 're' is not defined
>>> import re
>>> pattern=re.compile('版 本 号(.+?)</li>')
>>> data1=re.findall(pattern,result)
>>> print type(data1)
<type 'list'>
>>> print len(data1)
1
>>>
python re
最新推荐文章于 2025-09-06 09:26:50 发布
