【发布时间】:2018-06-10 12:45:38
【问题描述】:
尝试抓取 snapdeal 数据时的输出如下:
scrapy shell "https://www.snapdeal.com"
response.text
u'<HTML><HEAD>\n<TITLE>Access Denied</TITLE>\n</HEAD><BODY>\n<H1>Access Denied</H1>\n \nYou don\'t have permission to access "http://www.snapdeal.com/" on this server.<P>\nReference #18.1dd70b17.1514632273.17456300\n</BODY>\n</HTML>\n'
有什么帮助吗?
【问题讨论】:
-
这是刮保护,他们不想让你刮。您需要使用代理并使用其他一些用户代理,scrapy shell 将使用默认的scrapy用户代理
-
你必须复制整个请求并在scrapy中模仿,
标签: python html web-scraping scrapy