bvanheu / pytoutv

TOU.TV client library and user interfaces written in Python 3
96 stars 23 forks source link

Read timed out #60

Closed davidonlaptop closed 9 years ago

davidonlaptop commented 9 years ago

Hi guys,

I having trouble downloading an episode:

$ toutv fetch -q MAX -d epi7 "Dans l'oeil du dragon" "S03E07"
Dans.l'oeil.du.dragon.S03E07.Episode.7.2124kbps.ts                                 118.7 MiB    44/260 [#########-------------------------------------------]  16%Unknown error: HTTPConnectionPool(host='toutvuniver1-vh.akamaihd.net', port=80): Read timed out.

Might be related to #36 . A resume feature would be great; do you know if it is supported by Tou.Tv ?

L'ETS est partout!

Merci Vanheu!

eepp commented 9 years ago

There is a resume feature. I don't think it's released yet, but it's in the Git master.

Clone the repo and do a manual setup.

Then, you only need to issue the same command again to resume the download.

davidonlaptop commented 9 years ago

I tried with branch master, it does not seems to work.

⌂31% [:~/Movies/Oeil_du_Dragon] $ toutv fetch -q MAX -d epi7 "Dans l'oeil du dragon" "S03E07"
Destination file exists (use -f to force)
⌂33% [:~/Movies/Oeil_du_Dragon] 2 $ toutv fetch --help
usage: toutv fetch [-h] [-b BITRATE] [-d DIRECTORY] [-f]
                   [-q {MIN,AVERAGE,MAX}] [-u]
                   emission [episode]

positional arguments:
  emission              Emission name to fetch
  episode               Episode name to fetch

optional arguments:
  -h, --help            show this help message and exit
  -b BITRATE, --bitrate BITRATE
                        Video bitrate (default: use default quality)
  -d DIRECTORY, --directory DIRECTORY
                        Output directory (default: CWD)
  -f, --force           Overwrite existing output file
  -q {MIN,AVERAGE,MAX}, --quality {MIN,AVERAGE,MAX}
                        Video quality (default: AVERAGE)
  -u, --url             Fetch an episode using a TOU.TV URL

Which branch should I be using?

davidonlaptop commented 9 years ago

I had a quick look a branch develop, but there is no setup.py file.

davidonlaptop commented 9 years ago

Forget about it, I messed up :-)

I confirm that the resume feature works with master branch.

Is there a way to force it to retry automatically?

eepp commented 9 years ago

Is there a way to force it to retry automatically?

Yes:

while true; do
    if toutv fetch -q MAX -d epi7 "Dans l'oeil du dragon" "S03E07"; then
        break
    fi
done

:wink:

davidonlaptop commented 9 years ago

good call :-p