Closed lawye closed 4 years ago
你应该没有替换掉正确的文件,全局搜一下douyutv.py
替换了所有的douyutv.py, 使用pip和apt重装了streamlink, 依然没有解决
可能是斗鱼封了ip或禁止了puppteer的抓取,index.js 34行打印response可能出现{ error: -11, msg: '非法访问设备', data: '' }导致的,可能要另想办法了
hmm, streamlink依然报错
随便找了一个在播的斗鱼直播间测试
--- Logging error ---
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink/plugin/api/http_session.py", line 164, in request
*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 519, in request
prep = self.prepare_request(req)
File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 462, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 313, in prepare
self.prepare_url(url, params)
File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 387, in prepare_url
raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL '未开播': No schema supplied. Perhaps you meant http://未开播?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink_cli/main.py", line 242, in open_stream
stream_fd = stream.open()
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink/stream/http.py", line 73, in open
**self.args)
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink/plugin/api/http_session.py", line 175, in request
raise err
streamlink.exceptions.StreamError: Unable to open URL: 未开播 (Invalid URL '未开播': No schema supplied. Perhaps you meant http://未开播?)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink_cli/main.py", line 269, in output_stream
stream_fd, prebuffer = open_stream(stream)
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink_cli/main.py", line 244, in open_stream
raise StreamError("Could not open stream: {0}".format(err))
streamlink.exceptions.StreamError: Could not open stream: Unable to open URL: 未开播 (Invalid URL '未开播': No schema supplied. Perhaps you meant http://未开播?)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.5/logging/__init__.py", line 980, in emit
msg = self.format(record)
File "/usr/lib/python3.5/logging/__init__.py", line 830, in format
return fmt.format(record)
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink/logger.py", line 122, in format
record.message = record.getMessage()
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink/logger.py", line 45, in getMessage
msg = msg.format(*self.args)
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink/stream/http.py", line 42, in __repr__
return "<HTTPStream({0!r})>".format(self.url)
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink/stream/http.py", line 64, in url
**valid_args(self.args)).prepare().url
File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 267, in prepare
hooks=self.hooks,
File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 313, in prepare
self.prepare_url(url, params)
File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 387, in prepare_url
raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL '未开播': No schema supplied. Perhaps you meant http://未开播?
Call stack:
File "/usr/local/bin/streamlink", line 9, in <module>
load_entry_point('streamlink==0.14.2', 'console_scripts', 'streamlink')()
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink_cli/main.py", line 1002, in main
handle_url()
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink_cli/main.py", line 553, in handle_url
handle_stream(plugin, streams, stream_name)
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink_cli/main.py", line 403, in handle_stream
success = output_stream(stream)
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink_cli/main.py", line 273, in output_stream
log.error("Try {0}/{1}: Could not open stream {2} ({3})", i + 1, args.retry_open, stream, err)
Unable to print the message and arguments - possible formatting error.
Use the traceback above to help find the error.
Traceback (most recent call last):
File "/usr/local/bin/streamlink", line 9, in <module>
load_entry_point('streamlink==0.14.2', 'console_scripts', 'streamlink')()
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink_cli/main.py", line 1002, in main
handle_url()
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink_cli/main.py", line 553, in handle_url
handle_stream(plugin, streams, stream_name)
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink_cli/main.py", line 403, in handle_stream
success = output_stream(stream)
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink_cli/main.py", line 276, in output_stream
console.exit("Could not open stream {0}, tried {1} times, exiting", stream, args.retry_open)
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink_cli/console.py", line 87, in exit
formatted = msg.format(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink/stream/http.py", line 42, in __repr__
return "<HTTPStream({0!r})>".format(self.url)
File "/usr/local/lib/python3.5/dist-packages/streamlink-0.14.2-py3.5.egg/streamlink/stream/http.py", line 64, in url
**valid_args(self.args)).prepare().url
File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 267, in prepare
hooks=self.hooks,
File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 313, in prepare
self.prepare_url(url, params)
File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 387, in prepare_url
raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL '未开播': No schema supplied. Perhaps you meant http://未开播?
未开播
注意修改douyutv.py里房间号
感谢, 修改了douyutv.py里的房间号以后可以正常使用了
douyutv.py 复制到了/usr/local/lib/python3.5/streamlink/plugins/下
这是日志
直接运行日志中命令出现