05 2020 档案
摘要:# python 去除字符串的标点符号 punctuation = '!,;:?"\'、,;' def removePunctuation(text): text = re.sub(r'[{}]+'.format(punctuation),' ',text) return text.strip()
阅读全文
摘要:启动服务器错误requests包的requests.post发送后,传不回数据 改变服务器启动方法不要用eventlet,加个参数 celery worker -A celery_name --loglevel=info --pool=solo
阅读全文
摘要:在spider中 主动关闭爬虫: self.crawler.engine.close_spider(self, 'cookie失效关闭爬虫') 在pipeline 和downloadermiddlewares 主动关闭爬虫: spider.crawler.engine.close_spider(sp
阅读全文