所有人!
我是Scrapy框架的新手。我需要解析wisemapping.com。起初,我阅读了官方的Scrapy教程,并试图访问一个"wisemap“,但得到了一个错误:
[scrapy.core.engine] DEBUG: Crawled (404) <GET https://app.wisemapping.com/robots.txt> (referer: None)
[scrapy.downloadermiddlewares.retry] DEBUG: Gave up retrying
<GET https://app.wisemapping.com/c/maps/576786/public> (failed 3 times): 500 Internal Server Error
[scrapy.core.engine] DEBUG: Crawled (500) <GET https://app.wisemapping.com/c/maps/576786/public> (referer: None)
[scrapy.spidermiddlewares.httperror] INFO: Ignoring response <500 https://app.wisemapping.com/c/maps/576786/public>: HTTP status code is not handled or not allowed请给我一个解决以下代码问题的建议:
import scrapy
class QuotesSpider(scrapy.Spider):
name = "quotes"
def start_requests(self):
urls = [
'https://app.wisemapping.com/c/maps/576786/public',
]
for url in urls:
yield scrapy.Request(url=url, callback=self.parse)
def parse(self, response):
page = response.url.split("/")[-2]
filename = 'wisemape.html'
with open(filename, 'wb') as f:
f.write(response.body)
self.log('Saved file %s' % filename)发布于 2017-07-01 03:45:03
导航到https://app.wisemapping.com/c/maps/576786/public时出现错误"Outch!!.此地图不再可用。您没有足够的权限访问此地图。此地图已更改为私有或已删除。“
这张地图存在吗?如果是这样,请尝试将其公之于众。
如果您知道您尝试访问的地图确实存在,请验证您尝试访问的URL是否正确。
https://stackoverflow.com/questions/44850825
复制相似问题