0x776b7364 / toggle.sg-download

Python script to automate Toggle.sg video downloads
MIT License
26 stars 18 forks source link

Cannot download anything #34

Closed AkiraSEI closed 7 years ago

AkiraSEI commented 7 years ago

I receive the following error on Mac OS X's terminal when downloading videos, even things I was previously able to download. It was working fine until Feb 2017, which was my most recent successful download

[*] Processing input 1 of 1 ...

[i] Toggle video http://video.toggle.sg/en/series/vizhigal-s5/ep1/401610 detected [i] Obtained mediaID = 401610 [i] Performing HTTP GET request on Toggle video URL ... [i] Obtained apiUser = tvpapi_147 [i] Obtained apiPass = 11111 [i] Performing HTTP GET request on download URL ... [i] Performing JSON parsing ...

[i] Obtaining media name ... [i] Obtained media name = VizhigalS5-_Episode_1 [i] Obtaining URL records from download URL response ...

Traceback (most recent call last): File "./download_toggle_video2.py", line 440, in main() File "./download_toggle_video2.py", line 418, in main records_to_enqueue = process_url(input_url) File "./download_toggle_video2.py", line 158, in process_url return process_video_url(url) File "./download_toggle_video2.py", line 254, in process_video_url tempurlList.append((medianame+""+fileformat[0],urlRecord)) IndexError: list index out of range

OozoraHaruto commented 7 years ago

@AkiraSEI Hi I recently tried this script and have tried your link to test... The script still do work. Try updating your python library or reinstalling everything... I know it mayb a hassle but it's worth it right 😄

NGPriest commented 7 years ago

Try git pull, but i'm also experiencing the same/similar issue...

D:\toggle.sg-download>python download_toggle_video2.py http://video.toggle.sg/en/series/vizhigal-s5/ep1/401610

Toggle video and episodes downloader by 0x776b7364

[*] Processing input 1 of 1 ... [I] Toggle video http://video.toggle.sg/en/series/vizhigal-s5/ep1/401610 detected [W] Unable to obtain api user / password [W] Nothing to download for http://video.toggle.sg/en/series/vizhigal-s5/ep1/401610 [E] No files in queue [I] Quitting ... [I] === Script execution complete! ===

0x776b7364 commented 7 years ago

I've just tried it, and the download seems to be working. Please enable the debug function (-d) and upload the generated debug files to Pastebin or Github Gist or similar.

[I] Toggle video http://video.toggle.sg/en/series/vizhigal-s5/ep1/401610 detected
[I] Obtained media name = Vizhigal_S5_-_Episode_1
[I] Auto-selected URL: http://mcshls2015-vh.akamaihd.net/i/201604WM/MCPK0160425007030570/MC_SD_VIZHIGAL_S5_EP1_STB_MP4_,10,20,30,40,.mp4.csmil/master.m3u8
[W] No subtitles found!
[I] Starting download of queued URLs ...
[I] Thread e62ddaf1: processing URL http://mcshls2015-vh.akamaihd.net/i/201604WM/MCPK0160425007030570/MC_SD_VIZHIGAL_S5_EP1_STB_MP4_,10,20,30,40,.mp4.csmil/master.m3u8

<snip>

user@host:~/Desktop$ ls -al *.mp4
-rw-rw-r-- 1 user user 327238021 Apr 12 06:54 Vizhigal_S5_-_Episode_1_STB.mp4
NGPriest commented 7 years ago

[W] Unable to obtain api user / password

I decided to hardcode the api username and password and it's working...?

AkiraSEI commented 7 years ago

I'm using mac and terminal says -d is an invalid argument, could you send me the proper python syntax? ᐧ

On Wed, Apr 12, 2017 at 3:12 AM, 0x776b7364 notifications@github.com wrote:

I've just tried it, and the download seems to be working. Please enable the debug function (-d) and upload the generated debug files to Pastebin or Github Gist or similar.

[I] Toggle video http://video.toggle.sg/en/series/vizhigal-s5/ep1/401610 detected [I] Obtained media name = VizhigalS5-_Episode_1 [I] Auto-selected URL: http://mcshls2015-vh.akamaihd.net/i/201604WM/MCPK0160425007030570/MC_SD_VIZHIGAL_S5_EP1_STB_MP4_,10,20,30,40,.mp4.csmil/master.m3u8 [W] No subtitles found! [I] Starting download of queued URLs ... [I] Thread e62ddaf1: processing URL http://mcshls2015-vh.akamaihd.net/i/201604WM/MCPK0160425007030570/MC_SD_VIZHIGAL_S5_EP1_STB_MP4_,10,20,30,40,.mp4.csmil/master.m3u8

user@host:~/Desktop$ ls -al *.mp4 -rw-rw-r-- 1 user user 327238021 Apr 12 06:54 Vizhigal_S5_-_Episode_1_STB.mp4 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or mute the thread .
0x776b7364 commented 7 years ago

@NGPriest I didn't need to hardcode the API username and password, but if it works for you...

@AkiraSEI are you using the latest version of the script? I did not test this on OS X, but on Linux:

user@host:~/Desktop$ ./download_toggle_video2.py -d http://video.toggle.sg/en/series/vizhigal-s5/ep1/401610
<snip>
[I] Toggle video http://video.toggle.sg/en/series/vizhigal-s5/ep1/401610 detected
[D] Obtained mediaID = 401610
[D] Performing HTTP GET request on Toggle video URL ...
[D] Obtained apiUser = tvpapi_147
[D] Obtained apiPass = 11111
[D] Performing HTTP GET request on download URL ...
[D] Performing JSON parsing ...
[D] Obtaining media name ...
[I] Obtained media name = Vizhigal_S5_-_Episode_1
[D] Obtaining URL records from download URL response ...
[D] Inserted into temporary queue: http://mcshls2015-vh.akamaihd.net/i/201604WM/MCPK0160425007030570/MC_SD_VIZHIGAL_S5_EP1_STB_MP4_,10,20,30,40,.mp4.csmil/master.m3u8
[D] Inserted into temporary queue: http://mcshls2015-vh.akamaihd.net/i/201604WM/MCPK0160425007030570/MC_SD_VIZHIGAL_S5_EP1_ADD_MP4_,40,.mp4.csmil/master.m3u8
[D] Inserted into temporary queue: http://mcshls2015-vh.akamaihd.net/i/201604WM/MCPK0160425007030570/MC_SD_VIZHIGAL_S5_EP1_IPAD_MP4_,10,20,30,40,.mp4.csmil/master.m3u8
[D] Inserted into temporary queue: http://mcshls2015-vh.akamaihd.net/i/201604WM/MCPK0160425007030570/MC_SD_VIZHIGAL_S5_EP1_IPH_MP4_,10,20,30,.mp4.csmil/master.m3u8
[I] Auto-selected URL: http://mcshls2015-vh.akamaihd.net/i/201604WM/MCPK0160425007030570/MC_SD_VIZHIGAL_S5_EP1_STB_MP4_,10,20,30,40,.mp4.csmil/master.m3u8
[D] Obtaining media duration ...
[D] Obtained media duration = 00 hrs 23 mins 04 secs
[D] Performing HTTP GET request to check for subtitles ...
[D] Performing JSON parsing ...
[W] No subtitles found!
[I] Starting download of queued URLs ...
[I] Thread 6b64ff24: processing URL http://mcshls2015-vh.akamaihd.net/i/201604WM/MCPK0160425007030570/MC_SD_VIZHIGAL_S5_EP1_STB_MP4_,10,20,30,40,.mp4.csmil/master.m3u8
[D] Crafting ffmpeg command ...
[D] ffmpeg -hide_banner -loglevel info -i http://mcshls2015-vh.akamaihd.net/i/201604WM/MCPK0160425007030570/MC_SD_VIZHIGAL_S5_EP1_STB_MP4_,10,20,30,40,.mp4.csmil/master.m3u8 -c copy -bsf:a aac_adtstoasc "Vizhigal_S5_-_Episode_1_STB.mp4"
[D] Executing ffmpeg command ...
NGPriest commented 7 years ago

On Windows

usage: download_toggle_video2.py [-h] [-d] URL [URL ...]

Download Toggle videos.

positional arguments:
  URL          Toggle video or episodes URL

optional arguments:
  -h, --help   show this help message and exit
  -d, --debug  Print debugging statements to stdout and files <--

Try --debug?

0x776b7364 commented 7 years ago

Unfortunately I do not have a Windows or OS X system handy right now, and so I cannot debug those problems. FWIW, it's working fine for me, for both the link provided, and the -d command parameter.

NGPriest commented 7 years ago

Seems to work now?

D:\toggle.sg-download>python download_toggle_video2.py http://video.toggle.sg/en/series/vizhigal-s5/ep1/401610 -d

=====================================
Toggle video and episodes downloader
by 0x776b7364
=====================================

================================
[*] Processing input 1 of 1 ...
================================
[I] Toggle video http://video.toggle.sg/en/series/vizhigal-s5/ep1/401610 detected
[D] Obtained mediaID = 401610
[D] Performing HTTP GET request on Toggle video URL ...
[D] Obtained apiUser = tvpapi_147
[D] Obtained apiPass = 11111
[D] Performing HTTP GET request on download URL ...
[D] Performing JSON parsing ...
[D] Obtaining media name ...
[I] Obtained media name = Vizhigal_S5_-_Episode_1
[D] Obtaining URL records from download URL response ...
[D] Inserted into temporary queue: http://mcshls2015-vh.akamaihd.net/i/201604WM/MCPK0160425007030570/MC_SD_VIZHIGAL_S5_EP1_STB_MP4_,10,20,30,40,.mp4.csmil/master.m3u8
[D] Inserted into temporary queue: http://mcshls2015-vh.akamaihd.net/i/201604WM/MCPK0160425007030570/MC_SD_VIZHIGAL_S5_EP1_ADD_MP4_,40,.mp4.csmil/master.m3u8
[D] Inserted into temporary queue: http://mcshls2015-vh.akamaihd.net/i/201604WM/MCPK0160425007030570/MC_SD_VIZHIGAL_S5_EP1_IPAD_MP4_,10,20,30,40,.mp4.csmil/master.m3u8
[D] Inserted into temporary queue: http://mcshls2015-vh.akamaihd.net/i/201604WM/MCPK0160425007030570/MC_SD_VIZHIGAL_S5_EP1_IPH_MP4_,10,20,30,.mp4.csmil/master.m3u8
[I] Auto-selected URL: http://mcshls2015-vh.akamaihd.net/i/201604WM/MCPK0160425007030570/MC_SD_VIZHIGAL_S5_EP1_STB_MP4_,10,20,30,40,.mp4.csmil/master.m3u8
[D] Obtaining media duration ...
[D] Obtained media duration = 00 hrs 23 mins 04 secs
[D] Performing HTTP GET request to check for subtitles ...
[D] Performing JSON parsing ...
[W] No subtitles found!
[I] Starting download of queued URLs ...
[I] Thread 960d9ae6: processing URL http://mcshls2015-vh.akamaihd.net/i/201604WM/MCPK0160425007030570/MC_SD_VIZHIGAL_S5_EP1_STB_MP4_,10,20,30,40,.mp4.csmil/master.m3u8
[D] Crafting ffmpeg command ...
[D] ffmpeg -hide_banner -loglevel info -i http://mcshls2015-vh.akamaihd.net/i/201604WM/MCPK0160425007030570/MC_SD_VIZHIGAL_S5_EP1_STB_MP4_,10,20,30,40,.mp4.csmil/master.m3u8 -c copy -bsf:a aac_adtstoasc "Vizhigal_S5_-_Episode_1_STB.mp4"
0x776b7364 commented 7 years ago

Looks good. I'm glad it's working for you. Please close the issue if it has been resolved.

NGPriest commented 7 years ago

@AkiraSEI was the one who opened this issue, let's hope it works for them tonight...

0x776b7364 commented 7 years ago

Of course, I should have checked. @AkiraSEI please do update us on how it's going.

NGPriest commented 7 years ago

@0x776b7364 You should add version numbers, just incase they're using an old version? :p

0x776b7364 commented 7 years ago

Generally, before raising an issue you should check that it is reproducible on the latest version of the (freely-available) software or script. In the same vein, I'll assume that issues raised pertain to the latest version. :) The current version number is thus the Git commit hash (or 790ff01).

NGPriest commented 7 years ago

Unfortunately, it's hard to work out what version some users are using, including if they download the zip archive and not using git (to use git pull)...

Might be easier to add version numbers to the header or info or debug? Then add a version number each time we update the code?

AkiraSEI commented 7 years ago

I deleted and redownloaded the script, and it works now. I guess it was a version issue, but I had no way of knowing the latest version because I was downloading the ZIP.

Sorry for the trouble! ᐧ

On Wed, Apr 12, 2017 at 5:42 PM, NGPriest notifications@github.com wrote:

Unfortunately, it's hard to work out what version some users are using, including if they download the zip archive and not using git (to use git pull)...

Might be easier to add version numbers to the header or info or debug? Then add a version number each time we update the code?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/0x776b7364/toggle.sg-download/issues/34#issuecomment-293526750, or mute the thread https://github.com/notifications/unsubscribe-auth/AVR1HPApZ1haskjBWZDTkt6FH_GvHSXBks5rvJyDgaJpZM4MiQu6 .

NGPriest commented 7 years ago

@AkiraSEI Please close the issue? :D