Выскабливание данных обзора из Tripadvisor с Python

Я новичок в Python и хочу наскрести обзор данных от Tripadvisor.
Я пробую этот код https://github.com/magic890/tripadvisor-scraper

Я не изменяю его, но» ошибка загрузки » появляются.

/home/natto/tripadvisor-scraper/tripadvisorbot/spiders/dmoz.py:7: ScrapyDeprecationWarning: tripadvisorbot.spiders.dmoz.DmozSpider inherits from deprecated class scrapy.spider.BaseSpider, please inherit from scrapy.spider.Spider. (warning only on first subclass, there may be others)
  class DmozSpider(BaseSpider):
2016-05-06 18:42:36+0900 [scrapy] INFO: Scrapy 0.24.4 started (bot: scrapybot)
2016-05-06 18:42:36+0900 [scrapy] INFO: Optional features available: ssl, http11
2016-05-06 18:42:36+0900 [scrapy] INFO: Overridden settings: {'NEWSPIDER_MODULE': 'tripadvisorbot.spiders', 'FEED_FORMAT': 'json', 'SPIDER_MODULES': ['tripadvisorbot.spiders'], 'FEED_URI': 'output/result.json'}
2016-05-06 18:42:36+0900 [scrapy] INFO: Enabled extensions: FeedExporter, LogStats, TelnetConsole, CloseSpider, WebService, CoreStats, SpiderState
2016-05-06 18:42:36+0900 [scrapy] INFO: Enabled downloader middlewares: HttpAuthMiddleware, DownloadTimeoutMiddleware, UserAgentMiddleware, RetryMiddleware, DefaultHeadersMiddleware, MetaRefreshMiddleware, HttpCompressionMiddleware, RedirectMiddleware, CookiesMiddleware, HttpProxyMiddleware, ChunkedTransferMiddleware, DownloaderStats
2016-05-06 18:42:36+0900 [scrapy] INFO: Enabled spider middlewares: HttpErrorMiddleware, OffsiteMiddleware, RefererMiddleware, UrlLengthMiddleware, DepthMiddleware
2016-05-06 18:42:36+0900 [scrapy] INFO: Enabled item pipelines: 
2016-05-06 18:42:36+0900 [tripadvisor-restaurant] INFO: Spider opened
2016-05-06 18:42:36+0900 [tripadvisor-restaurant] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)
2016-05-06 18:42:36+0900 [scrapy] DEBUG: Telnet console listening on 127.0.0.1:6023
2016-05-06 18:42:36+0900 [scrapy] DEBUG: Web service listening on 127.0.0.1:6080
2016-05-06 18:42:36+0900 [tripadvisor-restaurant] DEBUG: Redirecting (301) to <GET https://www.tripadvisor.com/RestaurantSearch?geo=60763&q=New+York+City%2C+New+York&cat=&pid=> from <GET http://www.tripadvisor.com/RestaurantSearch?geo=60763&q=New+York+City%2C+New+York&cat=&pid=>
2016-05-06 18:42:36+0900 [tripadvisor-restaurant] ERROR: Error downloading <GET https://www.tripadvisor.com/RestaurantSearch?geo=60763&q=New+York+City%2C+New+York&cat=&pid=>
    Traceback (most recent call last):

Пожалуйста скажите мне если вы разрешаете это. Спасибо за помощь.

Я обновляю Scrapy и решил «ошибка загрузки», но появляется другая ошибка.

2016-05-10 11:32:19+0900 [tripadvisor-restaurant] DEBUG: Redirecting (301) to <GET https://www.tripadvisor.com/RestaurantSearch?geo=60763&q=New+York+City%2C+New+York&cat=&pid=> from <GET http://www.tripadvisor.com/RestaurantSearch?geo=60763&q=New+York+City%2C+New+York&cat=&pid=>
2016-05-10 11:32:20+0900 [tripadvisor-restaurant] DEBUG: Crawled (200) <GET https://www.tripadvisor.com/RestaurantSearch?geo=60763&q=New+York+City%2C+New+York&cat=&pid=> (referer: None)
2016-05-10 11:32:20+0900 [tripadvisor-restaurant] ERROR: Spider error processing <GET https://www.tripadvisor.com/RestaurantSearch?geo=60763&q=New+York+City%2C+New+York&cat=&pid=>
    Traceback (most recent call last):
      File "/home/natto/anaconda2/lib/python2.7/site-packages/twisted/internet/base.py", line 825, in runUntilCurrent
        call.func(*call.args, **call.kw)
      File "/home/natto/anaconda2/lib/python2.7/site-packages/twisted/internet/task.py", line 671, in _tick
        taskObj._oneWorkUnit()
      File "/home/natto/anaconda2/lib/python2.7/site-packages/twisted/internet/task.py", line 517, in _oneWorkUnit
        result = next(self._iterator)
      File "/home/natto/anaconda2/lib/python2.7/site-packages/scrapy/utils/defer.py", line 57, in <genexpr>
        work = (callable(elem, *args, **named) for elem in iterable)
    --- <exception caught here> ---
      File "/home/natto/anaconda2/lib/python2.7/site-packages/scrapy/utils/defer.py", line 96, in iter_errback
        yield next(it)
      File "/home/natto/anaconda2/lib/python2.7/site-packages/scrapy/contrib/spidermiddleware/offsite.py", line 26, in process_spider_output
        for x in result:
      File "/home/natto/anaconda2/lib/python2.7/site-packages/scrapy/contrib/spidermiddleware/referer.py", line 22, in <genexpr>
        return (_set_referer(r) for r in result or ())
      File "/home/natto/anaconda2/lib/python2.7/site-packages/scrapy/contrib/spidermiddleware/urllength.py", line 33, in <genexpr>
        return (r for r in result or () if _filter(r))
      File "/home/natto/anaconda2/lib/python2.7/site-packages/scrapy/contrib/spidermiddleware/depth.py", line 50, in <genexpr>
        return (r for r in result or () if _filter(r))
      File "/home/natto/tripadvisor-scraper/tripadvisorbot/spiders/tripadvisor-restaurant.py", line 41, in parse
        tripadvisor_item['url'] = self.base_uri + clean_parsed_string(get_parsed_string(snode_restaurant, 'div[@class="quality easyClear"]/span/a[@class="property_title "]/@href'))
    exceptions.TypeError: cannot concatenate 'str' and 'NoneType' objects

Пожалуйста, помогите мне еще раз.

1 ответ