爬取京东网页的全代码:

#爬取京东页面的全代码
import requests
url="https://item.jd.com/2967929.html"
try:
    r=requests.get(url)
    r.raise_for_status()
    r.encoding=r.apparent_encoding
    print(r.text[:1000])
except:
    print("爬取失败")

 

相关文章:

  • 2021-11-30
  • 2022-01-18
  • 2022-12-23
  • 2021-12-07
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2021-10-08
  • 2021-11-30
相关资源
相似解决方案