Open Sopor opened 10 years ago
Sounds like a good idea.
what video did you get that error btw?
If an episode is missing it will also get the error code 404 and it will not download all the episodes if i use the -A:
svtplay-dl -A http://www.tv10play.se/program/vralak-i-sin-city
INFO: Episode 1 of 8
INFO: Outfile: vralak-i-sin-city-avsnitt-1-tv10-play.ts
INFO: File already exists. use --force to overwrite
INFO: no thumb requested
INFO: Episode 2 of 8
INFO: Outfile: vralak-i-sin-city-avsnitt-2-tv10-play.ts
INFO: File already exists. use --force to overwrite
INFO: no thumb requested
INFO: Episode 3 of 8
ERROR: Something wrong with that url
ERROR: Error code: 404
So it would be great if it could continue to the next episode instead of halt on every error.
mm.. should remove all the sys.exit things to the next version.
Hmm, this was strange. I can watch episode 3 on http://www.tv10play.se/program/vralak-i-sin-city/400187 but i can't download it. I have even tried as a single episode but i get the same error. svtplay-dl http://www.tv10play.se/program/vralak-i-sin-city/400187 ERROR: Something wrong with that url ERROR: Error code: 404
after the rewrite. we fetch HLS and RTMP info. then later choose which one to download. the problem is that HLS playlist send 404 when we trying to access it...
and because of that 404 error message we do an sys.exit.. you can see that when you add -v to the script for more verbose log.
here is a patch for a hack to fix the problem.
diff --git a/lib/svtplay_dl/service/viaplay.py b/lib/svtplay_dl/service/viaplay.py
index 2c165c6..3b357b9 100644
--- a/lib/svtplay_dl/service/viaplay.py
+++ b/lib/svtplay_dl/service/viaplay.py
@@ -106,7 +106,10 @@ class Viaplay(Service, OpenGraphThumbMixin):
yield RTMP(copy.copy(options), filename, 800)
if streamj["streams"]["hls"]:
- streams = hlsparse(streamj["streams"]["hls"])
+ try:
+ streams = hlsparse(streamj["streams"]["hls"])
+ except SystemExit as e:
+ return
for n in list(streams.keys()):
yield HLS(copy.copy(options), streams[n], n)
if you want to download the episode right now. cd /path/to/svtplay-dl && patch -p1 < /path/to/file/with/patch/info
Now it will use RTMPDump and the resolution was much lower, but at least it works :thumbsup:
solved?
$ svtplay-dl --require-subtitle http://www.svtplay.se/video/7241917/fallet-o-j-simpson-american-crime-story/fallet-o-j-simpson-american-crime-story-sasong-1-the-dream-team
INFO: No subtitles available
cc @spaam
When using the -S with or without the --force-subtitle i get this error message when there are no subtitles: ERROR: Something wrong with that url ERROR: Error code: 404 It would be better to show something like this instead: No subtitle available for this episode or what do you think?