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

[douyutv] unable to download video data #13419

Open
stevencsc opened this issue Jun 18, 2017 · 19 comments
Open

[douyutv] unable to download video data #13419

stevencsc opened this issue Jun 18, 2017 · 19 comments
Labels

Comments

@stevencsc
Copy link

@stevencsc stevencsc commented Jun 18, 2017

  • Bug report (encountered problems with youtube-dl)
  • Question

[DouyuTV] : Downloading video URL info
Traceback (most recent call last):
File "main.py", line 19, in
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkyaecyzu\build\youtube_dl_init_.py", line 465, in main
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkyaecyzu\build\youtube_dl_init_.py", line 455, in _real_main
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkyaecyzu\build\youtube_dl\YoutubeDL.py", line 1919, in download
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkyaecyzu\build\youtube_dl\YoutubeDL.py", line 762, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkyaecyzu\build\youtube_dl\extractor\common.py", line 433, in extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkyaecyzu\build\youtube_dl\extractor\douyutv.py", line 106, in _real_extract
TypeError: list indices must be integers, not str

unable to download the video from douyutv. I am using the latest version 2017.06.18

@yan12125 yan12125 added the broken-IE label Jun 18, 2017
@chacha1024
Copy link

@chacha1024 chacha1024 commented Jun 19, 2017

It seems that douyu have used new api interface.

@yan12125 yan12125 mentioned this issue Jun 23, 2017
2 of 6 tasks complete
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jun 23, 2017

streamlink/streamlink#1015 may help. I didn't test it by myself.

@kira1928
Copy link

@kira1928 kira1928 commented Jun 30, 2017

It seems that streamlink/streamlink#1015 using urls which can only work for less than 10 minutes, then the server will close the connection.

@lbcake
Copy link

@lbcake lbcake commented Jul 3, 2017

可以试试 GO 语言, China 有些人 就是用go 语言写的 可以录。(现在的是用go语言写的 以前的是C#)

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jul 3, 2017

@lbcake Could you point out a link to the Douyu downloader in Go?

@lbcake
Copy link

@lbcake lbcake commented Jul 3, 2017

U try this。链接: https://pan.baidu.com/s/1o8dVgNo 密码: snjt This Go language。 and i dislike go。

eg:https://www.douyu.com/206858

https://www.douyu.com/bianlive

@huxuan
Copy link
Contributor

@huxuan huxuan commented Jul 3, 2017

confirmed that streamlink should have solved the problem as @kira1928 mentioned above.

1 similar comment
@kira1928
Copy link

@kira1928 kira1928 commented Jul 3, 2017

@rosynirvana proposed a way to fix the 10 minutes download limit of streamlink/streamlink#1015 in this commit. The communication detail about that commit can be found here.

Now I can download douyu live stream by rosynirvana/douyu_cli for a long enough time.

I think youtube-dl can port that fixed method.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jul 3, 2017

Thanks for the hint. rosynirvana's version is from debugzxcv, which is in turn created by spacemeowx2 (https://github.com/spacemeowx2/DouyuHTML5Player). To port that code, we'll need to ask for explicit permission (change the upstream license or add an exception for youtube-dl) from spacemeowx2.

@kira1928
Copy link

@kira1928 kira1928 commented Jul 3, 2017

His whole project is based on debugzxcv, but I think rosynirvana made that exact commit which fixed the 10 minutes limitation.
Any way, the license is a problem for youtube-dl. Is it possible to rewrite the logic to avoid license? (I'm totally new about license problem, if that's a bad idea, I'm sorry :p)

@rosynirvana
Copy link

@rosynirvana rosynirvana commented Jul 3, 2017

First part of douyu's private cipher, dyprvt in douyu_cli or black box in DouyuHTML5Player is a modified version of md5. But the second part is much harder to figure out.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jul 5, 2017

@kira1928: I know clean room reverse engineering is legal (someone writes down how Douyu extracts a video and another turns the flow into Python). I'm not sure about rewriting,

@brlala
Copy link

@brlala brlala commented Jul 22, 2017

Hi, sorry for bringing up this post, are there any updates on this? Not able to download the offline video https://v.douyu.com/show/o8KxjMdxGNOMVLwb nor download any of the streams on douyu.com. Thank you

@ytdl-org ytdl-org locked and limited conversation to collaborators Jul 22, 2017
@ytdl-org ytdl-org unlocked this conversation Aug 24, 2017
@brlala
Copy link

@brlala brlala commented Nov 26, 2017

youtube-dl https://www.douyu.com/t/shengdian10m67373
[DouyuTV] shengdian10m67373: Downloading webpage
ERROR: Unable to extract room id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Got this error when downloading from douyu. Can you kindly look into this? Thank you

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Nov 26, 2017

See: #14692

@zizhengwu
Copy link

@zizhengwu zizhengwu commented Mar 5, 2018

Is there any progress on this? AFAIK, streamlink is able to stream Douyu properly.

@jiahaoliang
Copy link

@jiahaoliang jiahaoliang commented Jun 8, 2018

Reraise this issue:
youtube-dl https://www.douyu.com/timelessX
[DouyuTV] timelessX: Downloading webpage
[DouyuTV] timelessX: Downloading room info
[DouyuTV] timelessX: Downloading video URL info
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/init.py", line 472, in main
_real_main(argv)
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/init.py", line 462, in _real_main
retcode = ydl.download(all_urls)
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 2001, in download
url, force_generic_extractor=self.params.get('force_generic_extractor', False))
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 792, in extract_info
ie_result = ie.extract(url)
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 500, in extract
ie_result = self._real_extract(url)
File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/douyutv.py", line 106, in _real_extract
})['data']['live_url']
TypeError: list indices must be integers, not unicode

Confirmed on 2018.6.4

Apparently, streamlink is able to stream Douyu.
# streamlink.exe https://www.douyu.com/timelessX source_http
(Video plays...)
# streamlink.exe --version
streamlink-script.py 0.10.0

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

Successfully merging a pull request may close this issue.

None yet
10 participants
You can’t perform that action at this time.