ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132k stars 10.01k forks source link

Afreecatv has failed #12179

Closed itttttta closed 7 years ago

itttttta commented 7 years ago

C:\Users\wd\AppData\Local\Programs\Python\Python35-32\python.exe C:/Users/wd/Desktop/youtube-dl-master/youtube_dl/main.py http://vod.afreecatv.com/PLAYER/STATION/18650793 [afreecatv] 18650793: Downloading XML ERROR: Specified AfreecaTV video does not exist

Process finished with exit code 1

mcerdeira commented 7 years ago

Seems like it is expecting the video url in the path "track/video/file" from the downloaded xml, but it is does not exists. This is the XML it parses and gets now: http://afbbs.afreecatv.com:8080/api/video/get_video_info.php?nTitleNo=18650793 link xml get_video_info.php.xml.zip

If I have to guess, the xml has changed (compared to the version it was developed for) and now the link is here: <video duration="107">rtmp://flv10.afreecatv.com/afflv10/mp4:AFFLV/00/7/29/10_00_1487406867466338_2147483647.mp4

mcerdeira commented 7 years ago

Maybe, some hack like this: https://gist.github.com/mcerdeira/cf83dedf6ba553b5e34ad5b5e8371f31

itttttta commented 7 years ago

Yeah , you are right .

Right xml:

`This XML file does not appear to have any style information associated with it. The document tree is shown below.

tjdbs0274 SUCCEED http://stimg.afreecatv.com/LOGO/tj/tjdbs0274/tjdbs0274.jpg <![CDATA[ 공부 ]]> 149 http://videoimg.afreecatv.com/php/SnapshotLoad.php?rowKey=20170218_F8599C69_188956549_1_r false http://vod.afreecatv.com/PLAYER/STATION/18650795 ]]> ` # **Faild Xml:** `This XML file does not appear to have any style information associated with it. The document tree is shown below. badkids SUCCEED http://stimg.afreecatv.com/LOGO/ba/badkids/badkids.jpg <![CDATA[ 오늘은 다르다! 쏘님의 우월한 위아래~ 댄스리액션! ]]> 107 http://iflv10.afreecatv.com/AFFLV/00/7/29/10_00_1487406867466338_2147483647.jpg false false http://vod.afreecatv.com/PLAYER/STATION/18650793 ]]> ` However,there are a lot of faild xml files.
mcerdeira commented 7 years ago

Yeah, I don´t know if the xml is failed, seems to be just another format... (also, the "new" xml contains a video link but rtmp protocol) may be this is silly to ask but: is there any specification from afreecatv?

itttttta commented 7 years ago

Sorry,i don't know.I test a few urls .There are just two xml styles above .One is rtmp video ,i can not download this video by youtube-dl.

mcerdeira commented 7 years ago

Ok, so I think that we need to test for method 1, and then, if the tag is not present, go for method 2, similar to my proposed fix (dirty hack) here using a flag (or not): https://gist.github.com/mcerdeira/cf83dedf6ba553b5e34ad5b5e8371f31#file-gistfile1-py-L115

        if xpath_element(video_xml, './track/video/file') is None:
            method_b = True
            #raise ExtractorError('Specified AfreecaTV video does not exist',
#                     expected=True)
yan12125 commented 7 years ago

Sorry for being late. I've pushed the fix to master. Thanks for identifying and diagnosing the problem, @mcerdeira and @ivanda! The fix will be included in the next version.