LifeActor / ykdl

a video downloader focus on China mainland video sites.(一款专注于中国大陆视频网站的视频下载器。)
https://github.com/LifeActor/ykdl
Other
1.45k stars 285 forks source link

ERROR in douyu.com #561

Closed hatienl0i2612 closed 3 years ago

hatienl0i2612 commented 3 years ago

在提交前,请确保您已经检查了以下内容!

请将错误输出粘贴在下面:

[在这里粘贴完整日志]

如果您有其他附言,例如问题只在某个视频发生,或者是一般性讨论或者提出新功能,请在下面添加:

[您的内容]

i Try to run ykdl "https://www.douyu.com/594019" -p mpv

So, here is error

  File "C:\Python39\Scripts\ykdl-script.py", line 33, in <module>
    sys.exit(load_entry_point('ykdl==1.6.2', 'console_scripts', 'ykdl')())
  File "c:\python39\lib\site-packages\cykdl\__main__.py", line 173, in main
    info = parser(u)
  File "c:\python39\lib\site-packages\ykdl\extractor.py", line 24, in parser
    info = self.prepare()
  File "c:\python39\lib\site-packages\ykdl\extractors\douyu\live.py", line 39, in prepare
    html_content = get_content(api_url)
  File "c:\python39\lib\site-packages\ykdl\util\html.py", line 67, in get_content
    response = urlopen(req)
  File "c:\python39\lib\urllib\request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "c:\python39\lib\urllib\request.py", line 523, in open
    response = meth(req, response)
  File "c:\python39\lib\urllib\request.py", line 632, in http_response
    response = self.parent.error(
  File "c:\python39\lib\urllib\request.py", line 561, in error
    return self._call_chain(*args)
  File "c:\python39\lib\urllib\request.py", line 494, in _call_chain
    result = func(*args)
  File "c:\python39\lib\urllib\request.py", line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

i installed mpv player i hope you can fix it soon

mengmo commented 3 years ago

https://github.com/zhangn1985/ykdl#simple-installation-guide

Packages on PyPI had been outdated, consider install via other package managers, or direct install from source.

hatienl0i2612 commented 3 years ago

it work, ths you so much

hatienl0i2612 commented 3 years ago

In CLI ykdl "https://www.douyu.com/594019" --json but i dont know how to get json in code

import ykdl
....

can you give a example, url ex https://www.douyu.com/594019

SeaHOH commented 3 years ago

The CLI itself is a example.