🔤 English | 🀄 简体中文 | 🔙 my8100/files
- Install via
pip install -U git+https://github.com/my8100/scrapyd.git@add_basic_auth
PR merged: pip install -U git+https://github.com/scrapy/scrapyd.git
- Update the scrapyd.conf file, check out the official docs for more info
[scrapyd]
username = yourusername
password = yourpassword
- Run command
scrapyd
In [1]: import requests
In [2]: requests.get('http://127.0.0.1:6800/').status_code
Out[2]: 401
In [3]: requests.get('http://127.0.0.1:6800/', auth=('admin', 'admin')).status_code
Out[3]: 401
In [4]: requests.get('http://127.0.0.1:6800/', auth=('yourusername', 'yourpassword')).status_code
Out[4]: 200
- Note that you have to update ScrapydWeb as the Jobs page of Scrapyd was refactored in PR #256:
pip install -U git+https://github.com/my8100/scrapydweb.git