scrapy框架爬虫部署到scrapyinghub上报错UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 110

python 读取文件时报错UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 110: illegal multibyte sequence

把要导入的模块写在requirements.txt文档中,比如:

bs4==0.0.1
pandas==0.19.2
selenium==3.141.0
requests==2.22.0

然后在 scrapinghub.yml文件中添加requirements部分https://support.scrapinghub.com/support/solutions/articles/22000200400-deploying-python-dependencies-for-your-projects-in-scrapy-cloud

project: 406366
stacks:
    default: scrapy:1.6-py3 #表示用的python3
requirements:
    file: requirements.txt

然后就能成功。

你可能感兴趣的:(爬虫,爬虫,scrapyinghub,scrapy)