eikek / meth

Commandline client for mediathekview
MIT License
4 stars 0 forks source link

increase log level for troubleshooting? #5

Closed Wurzelmann closed 5 years ago

Wurzelmann commented 5 years ago

Some downloads seem to go okay, but download only files with approximately 600 bytes in size. Is there a possibility to increase the log level or have a log with more detailed errors for these cases?

eikek commented 5 years ago

Since the downloads are done via curl, I think it should be possible to add some flags to the curl command in meth.conf.

meth {
  download-cmd {
    options = [ "-v", "-L", "-o", "%[outfile]", "%[url]" ]
  }
}

Does the content of the small file tell anything? I very often had a HTML file saying that I cannot download this file due to my geographic location….

Wurzelmann commented 5 years ago

Thank you, I tried the -v flag, but it did not do anything, I'm afraid.

The files are M3U playlist, ASCII text, with very long lines according to the program file, example content:

#EXTM3U
#EXT-X-ALLOW-CACHE:NO
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=3421748,CODECS="avc1.77.32,mp4a.40.2",RESOLUTION=1280x720
https://apasfiis.sf.apa.at/ipad/cms-worldwide/2019-03-24_1332_tl_02_Heimat-fremde-H_____14008431__o__1802166485__s14468657_7__ORF2HD_13421406P_13520221P_Q8C.mp4/chunklist.m3u8?lbs=20190326071729081&origin=http%253a%252f%252fvarorfvod.sf.apa.at%252fcms-worldwide_nas%252f_definst_%252fnas%252fcms-worldwide%252fonline%252f2019-03-24_1332_tl_02_Heimat-fremde-H_____14008431__o__1802166485__s14468657_7__ORF2HD_13421406P_13520221P_Q8C.mp4%252fchunklist.m3u8&ip=84.115.132.40&ua=Mozilla%252f5.0%2b(X11%253b%2bLinux%2bx86_64%253b%2brv%253a64.0)%2bGecko%252f20100101%2bFirefox%252f64.0%2b-v%2b-L

I previously had problems with geolocation, but on another server, this one can download some videos from the same station without problems, but most of them are just playlists and I am not sure why.

This is the download command, I am using

meth download --pattern "%[date]_%[title]" '<TITLE>' station:orf

eikek commented 5 years ago

Ah, that's strange. I'm not sure if meth can do much here. It looks like the URLs reported by zdfmediathek are URLs to playlist files. Maybe a different download tool like youtube-dl can handle this? What logging info would you like to see? The concrete URL would be helpful I guess…

Wurzelmann commented 5 years ago

I guess, I just wanted to make sure that meth handled everything correctly... when using the zdfmediathek GUI tool, all downloads are working properly, so my initial thought was "meth does not handle the URLs correctly".

Wurzelmann commented 5 years ago

Okay, I replaced curl with youtube-dl, like you advised and it seems to work. Thanks for the suggestion!

eikek commented 5 years ago

@Wurzelmann you're right in that meth doesn't handle these urls correctly. Since meth delegates downloading to a separate tool anyways, I didn't care much about downloading :-) But I'm glad to hear that it works with youtube-dl. Thanks for your investigation!