最基础的爬取代码
---分割线
'import requests
url="https://item.jd.com/100006947212.html"
try:
r = requests.get(url)
r.raise_for_status()
r.encoding = r.apparent_encoding
print(r.text[:1000])
except:
print("false")'
---分割线
'import requests
url="https://item.jd.com/100006947212.html"
try:
r = requests.get(url)
r.raise_for_status()
r.encoding = r.apparent_encoding
print(r.text[:1000])
except:
print("false")'