followall.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:Scrapy-BenchCLI 作者: Parth-Vader 项目源码 文件源码
def __init__(self, **kw):
        super(FollowAllSpider, self).__init__(**kw)
        url = 'http://localhost/books.toscrape.com/index.html'
        if not url.startswith('http://') and not url.startswith('https://'):
            url = 'http://%s/' % url
        self.url = url
        self.allowed_domains = [re.sub(r'^www\.', '', urlparse(url).hostname)]
        self.link_extractor = LinkExtractor()
        self.cookies_seen = set()
        self.previtem = 0
        self.items = 0
        self.timesec = datetime.datetime.utcnow()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号