如何在 Scrapy 中使用 AJAXCRAWL_ENABLED?

How to use AJAXCRAWL_ENABLED in Scrapy?

我阅读了 this 文档

Scrapy 中的 AJAXCRAWL 是如何工作的,当它为真时会发生什么?

您所指的配置似乎在midleware source中提到:

class AjaxCrawlMiddleware(object):
    """
    Handle 'AJAX crawlable' pages marked as crawlable via meta tag.
    For more info see https://developers.google.com/webmasters/ajax-crawling/docs/getting-started.
    """

    def __init__(self, settings):
        if not settings.getbool('AJAXCRAWL_ENABLED'):
            raise NotConfigured

所以为了回答你的问题,它的作用是为使用 AJAX 并实施 the google specs. You will also probably need to enable the downloader middleware

的网站启用抓取支持