hylarucoder / danmu.fm

douyutv danmu 斗鱼TV 弹幕助手
310 stars 76 forks source link

403错误 请帮忙查看原因. #18

Closed pan8664716 closed 7 years ago

pan8664716 commented 7 years ago

$ danmu.fm -q 3 -m 1 -p 0 -vvvv http://www.douyu.com/226855

_____                                ______ __  __
|  __ \                              |  ____|  \/  |
| |  | | __ _ _ __  _ __ ___  _   _  | |__  | \  / |
| |  | |/ _` | '_ \| '_ ` _ \| | | | |  __| | |\/| |
| |__| | (_| | | | | | | | | | |_| |_| |    | |  | |
|_____/ \__,_|_| |_|_| |_| |_|\__,_(_)_|    |_|  |_|

                    ---- A Terminal Tools For DouyuTV

@author Micheal Gardner (twocucao@gmail.com)
                                last_update 2017-07-10 08:54:59

[15:44:30] INFO::danmu - 正在检查环境 [15:44:30] INFO::danmu - 程序正在启动,检查环境配置 [15:44:30] INFO::danmu - 开始配置环境 [15:44:30] INFO::danmu - 环境检查完毕,正在开启斗鱼客户端(请等待15s~30s) Traceback (most recent call last): File "/usr/local/bin/danmu.fm", line 11, in sys.exit(main()) File "/usr/local/lib/python3.6/site-packages/danmufm/danmu.py", line 117, in main parse_command() File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in call return self.main(args, kwargs) File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke return callback(args, *kwargs) File "/usr/local/lib/python3.6/site-packages/danmufm/danmu.py", line 107, in parse_command start_douyu_client() File "/usr/local/lib/python3.6/site-packages/danmufm/danmu.py", line 112, in start_douyu_client DouyuClient(url).start() File "/usr/local/lib/python3.6/site-packages/danmufm/client/douyu_client.py", line 51, in start auth_server_ip, auth_server_port = self.fetch_room_info(self.url) File "/usr/local/lib/python3.6/site-packages/danmufm/client/douyu_client.py", line 62, in fetch_room_info html = urlopen(url).read().decode() File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 564, in error result = self._call_chain(args) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(args) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 756, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 570, in error return self._call_chain(args) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(*args) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: Forbidden

songlijiang commented 7 years ago

大概看了下,楼主发请求的ua 都没改 ,这当然会被封

hylarucoder commented 7 years ago

@songlijiang 谢谢提醒 ,已经修复

执行更新

pip install -i https://pypi.doubanio.com/simple -U danmu.fm