Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

b站直播和斗鱼直播均无法解析出地址诶 #1

Closed
CookieJaySJ opened this issue Aug 14, 2018 · 9 comments
Closed

b站直播和斗鱼直播均无法解析出地址诶 #1

CookieJaySJ opened this issue Aug 14, 2018 · 9 comments

Comments

@CookieJaySJ
Copy link

No description provided.

@CookieJaySJ
Copy link
Author

提示:oops something wrong

@xjbeta
Copy link
Owner

xjbeta commented Aug 15, 2018

下载最新版 设置里打开log 重启软件 重新操作一遍 然后把log 发过来

@murongchenxing
Copy link

同样也是这个情况,下面是log里的内容。

11:01:43.795 [iina+][d] App did finish launch
11:01:43.795 [iina+][d] App Version 0.2 (Build 2)
11:01:43.795 [iina+][d] macOS Version 10.13.6 (Build 17G65)
11:01:45.346 [iina+][d] Get bilibili dynamicList error: Key not found: data.mid
11:01:57.556 [iina+][d] JSON decode error: Error Domain=NSCocoaErrorDomain Code=3840 "No value." UserInfo={NSDebugDescription=No value.}
11:01:57.558 [iina+][d] JSON string:

@xjbeta
Copy link
Owner

xjbeta commented Aug 16, 2018

打开终端输入
you-get "https://live.bilibili.com/3" --json
或者
ykdl "https://live.bilibili.com/3" --json

正确的json 输出 (ykdl 输出的略有不同

{
    "extra": {
        "referer": "https://live.bilibili.com/3",
        "ua": "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0"
    },
    "site": "Bilibili",
    "streams": {
        "live": {
            "container": "flv",
            "size": 0,
            "src": [
                "http://58.222.35.206/live-bvc/727656/live_11153765_9369560.flv?expires=1534390722&ssig=mQRzzirFRDgr4fkGlCCjwQ&oi=2045566214"
            ]
        }
    },
    "title": "哔哩哔哩音悦台",
    "url": "https://live.bilibili.com/3"
}

(未开播的直播 只会显示error

@murongchenxing
Copy link

image
你好,试了两个网站,输出分别如图,确定直播都是在开着的,网页可以看。

@xjbeta
Copy link
Owner

xjbeta commented Aug 16, 2018

你安装的you-get 的问题
you-get --version
you-get: version 0.4.1099, a tiny downloader that scrapes the web.

斗鱼用ykdl
you-get 不能输出标准的json 数据

@murongchenxing
Copy link

you-get --version
you-get: version 0.4.1128, a tiny downloader that scrapes the web.
这是you-get的版本,下边是ykdl输出的斗鱼链接。

ykdl "http://www.douyu.com/110" --json
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1317, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1229, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1275, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1224, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1016, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 956, in send
self.connect()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1392, in connect
server_hostname=server_hostname)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 412, in wrap_socket
session=session
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 850, in _create
self.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1108, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/bin/ykdl", line 11, in
load_entry_point('ykdl==1.6.2', 'console_scripts', 'ykdl')()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/cykdl/main.py", line 173, in main
info = parser(u)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ykdl/extractor.py", line 24, in parser
info = self.prepare()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ykdl/extractors/douyu/live.py", line 39, in prepare
html_content = get_content(api_url)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ykdl/util/html.py", line 67, in get_content
response = urlopen(req)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 543, in _open
'_open', req)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1360, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1319, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)>

@xjbeta
Copy link
Owner

xjbeta commented Aug 16, 2018

我用虚拟机测试了一下you-get 和ykdl 也并没有这样的问题
ykdl 可以去找作者反馈一下
接下来的版本我会考虑内置you-get 和ykdl

@xjbeta xjbeta closed this as completed Aug 28, 2018
@xjbeta
Copy link
Owner

xjbeta commented Aug 28, 2018

最新版内置了一个ykdl
DMG
ZIP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants