【发布时间】:2017-04-08 23:39:28
【问题描述】:
我使用请求来抓取网页中的某些内容。
当我使用
import requests
requests.get('example.org')
我得到的页面与我使用浏览器或使用时得到的页面不同
import urllib.request
urllib.request.urlopen('example.org')
我尝试使用urllib,但速度真的很慢。
在一个比较测试中,我做的比requests慢了50%!!
你是怎么解决这个问题的?
【问题讨论】:
标签: python python-requests urllib