0x776b7364 / toggle.sg-download

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

Unable to download due to missing mmpeg file #47

Closed noiseloops closed 6 years ago

noiseloops commented 6 years ago

updated to the latest download. received this error

[2018-02-20 22:15:24.072] [I] Toggle video https://video.toggle.sg/en/series/kisah-tok-kadi-s2/ep4/563894 detected [2018-02-20 22:15:24.072] [D] Obtained mediaID = 563894 [2018-02-20 22:15:24.072] [D] Performing HTTP GET request on Toggle video URL ... [2018-02-20 22:15:34.069] [D] Obtained apiUser = tvpapi_147 [2018-02-20 22:15:34.089] [D] Obtained apiPass = 11111 [2018-02-20 22:15:34.091] [D] Performing HTTP GET request on download URL ... [2018-02-20 22:15:34.128] [D] Performing JSON parsing ... [2018-02-20 22:15:34.161] [D] Obtaining media name ... [2018-02-20 22:15:34.168] [I] Obtained media name = Kisah_Tok_KadiS2-_Episode_4 [2018-02-20 22:15:34.170] [D] Obtaining URL records from download URL response ... [2018-02-20 22:15:34.171] [D] Examining urlRecord https://cdnapisec.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/https/entryId/0_f8dvrre5/format/sl/tags/web_hd/f/a.ism ... [2018-02-20 22:15:34.173] [D] Examining urlRecord http://cdnapi.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/http/entryId/0_f8dvrre5/format/sl/tags/sstv_hd/f/a.ism ... [2018-02-20 22:15:34.174] [D] Examining urlRecord http://cdnapi.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/http/entryId/0_f8dvrre5/format/mpegdash/tags/mobile_hd/f/a.mpd ... [2018-02-20 22:15:34.174] [D] Examining urlRecord https://cdnapisec.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/https/entryId/0_f8dvrre5/format/mpegdash/tags/web_hd/f/a.mpd ... [2018-02-20 22:15:34.176] [D] Examining urlRecord http://cdnapi.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/http/entryId/0_f8dvrre5/format/mpegdash/tags/dashtv_hd/f/a.mpd ... [2018-02-20 22:15:34.177] [D] Examining urlRecord http://cdnapi.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/http/entryId/0_f8dvrre5/format/applehttp/tags/mobile_hd/f/a.m3u8 ... [2018-02-20 22:15:34.180] [D] Appending urlRecord http://cdnapi.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/http/entryId/0_f8dvrre5/format/applehttp/tags/mobile_hd/f/a.m3u8 to temp_urlList ... [2018-02-20 22:15:34.180] [D] Examining urlRecord https://cdnapisec.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/https/entryId/0_f8dvrre5/format/applehttp/tags/web_hd/f/a.m3u8 ... [2018-02-20 22:15:34.184] [D] Appending urlRecord https://cdnapisec.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/https/entryId/0_f8dvrre5/format/applehttp/tags/web_hd/f/a.m3u8 to temp_urlList ... [2018-02-20 22:15:34.186] [D] Examining urlRecord http://cdnapi.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/http/entryId/0_f8dvrre5/format/applehttp/tags/hlstv_hd/f/a.m3u8 ... [2018-02-20 22:15:34.187] [D] Appending urlRecord http://cdnapi.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/http/entryId/0_f8dvrre5/format/applehttp/tags/hlstv_hd/f/a.m3u8 to temp_urlList ... [2018-02-20 22:15:34.188] [D] Examining urlRecord NA ... [2018-02-20 22:15:34.190] [D] Examining urlRecord NA ... [2018-02-20 22:15:34.190] [D] Examining urlRecord http://cdnapi.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/http/entryId/0_f8dvrre5/format/mpegdash/tags/tablet_hd/f/a.mpd ... [2018-02-20 22:15:34.191] [D] Examining urlRecord http://cdnapi.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/http/entryId/0_f8dvrre5/format/applehttp/tags/tablet_hd/f/a.m3u8 ... [2018-02-20 22:15:34.193] [D] Appending urlRecord http://cdnapi.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/http/entryId/0_f8dvrre5/format/applehttp/tags/tablet_hd/f/a.m3u8 to temp_urlList ... [2018-02-20 22:15:34.196] [D] Examining urlRecord NA ... [2018-02-20 22:15:34.197] [D] Examining urlRecord http://cdnapi.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/http/entryId/0_f8dvrre5/format/mpegdash/tags/hbbtv_hd/f/a.mpd ... [2018-02-20 22:15:34.197] [D] Examining urlRecord NA ... [2018-02-20 22:15:34.197] [D] Examining urlRecord NA ... [2018-02-20 22:15:34.197] [D] Examining urlRecord NA ... [2018-02-20 22:15:34.200] [D] Inserted into temporary queue: http://cdnapi.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/http/entryId/0_f8dvrre5/format/applehttp/tags/hlstv_hd/f/a.m3u8 [2018-02-20 22:15:34.200] [D] Inserted into temporary queue: https://cdnapisec.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/https/entryId/0_f8dvrre5/format/applehttp/tags/web_hd/f/a.m3u8 [2018-02-20 22:15:34.201] [D] Inserted into temporary queue: http://cdnapi.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/http/entryId/0_f8dvrre5/format/applehttp/tags/tablet_hd/f/a.m3u8 [2018-02-20 22:15:34.203] [D] Inserted into temporary queue: http://cdnapi.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/http/entryId/0_f8dvrre5/format/applehttp/tags/mobile_hd/f/a.m3u8 [2018-02-20 22:15:34.204] [I] Auto-selected URL: http://cdnapi.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/http/entryId/0_f8dvrre5/format/applehttp/tags/hlstv_hd/f/a.m3u8 [2018-02-20 22:15:34.209] [D] Obtaining media duration ... [2018-02-20 22:15:34.210] [D] Obtained media duration = 00 hrs 46 mins 26 secs [2018-02-20 22:15:34.210] [D] Performing HTTP GET request to check for subtitles ... [2018-02-20 22:15:34.303] [D] Performing JSON parsing ... [2018-02-20 22:15:34.305] [I] Found English subtitles! Adding https://cc-toggle.akamaized.net/563894_DAY8390_English.srt to queue list ... [2018-02-20 22:15:34.305] [I] Found Malay subtitles! Adding https://cc-toggle.akamaized.net/563894_DAY8390_Malay.srt to queue list ... [2018-02-20 22:15:34.306] [I] Starting download of queued URLs ... [2018-02-20 22:15:34.312] [I] Thread 8da230da: processing URL http://cdnapi.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/http/entryId/0_f8dvrre5/format/applehttp/tags/hlstv_hd/f/a.m3u8 [2018-02-20 22:15:34.313] [I] Thread e0fcc08a: processing URL https://cc-toggle.akamaized.net/563894_DAY8390_English.srt [2018-02-20 22:15:34.315] [D] Crafting ffmpeg command ... [2018-02-20 22:15:34.316] [D] ffmpeg -user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36" -headers 'origin: http://video.toggle.sg/

' -hide_banner -loglevel info -i http://cdnapi.kaltura.com/p/2082311/sp/208231100/playManifest/protocol/http/entryId/0_f8dvrre5/format/applehttp/tags/hlstv_hd/f/a.m3u8 -c copy -bsf:a aac_adtstoasc "Kisah_Tok_KadiS2-_Episode_4_hlstv_hd.mp4" [2018-02-20 22:15:34.332] [D] Executing ffmpeg command ... [2018-02-20 22:15:34.456] [I] Thread e0fcc08a completed [2018-02-20 22:15:34.457] [I] Thread e0fcc08a: processing URL https://cc-toggle.akamaized.net/563894_DAY8390_Malay.srt [2018-02-20 22:15:34.552] [I] Thread e0fcc08a completed [2018-02-20 22:15:35.176] [E] ffmpeg file not found, or existing file is for incorrect architecture, or download was interrupted prematurely. [2018-02-20 22:15:35.177] [I] Thread 8da230da completed [2018-02-20 22:15:35.177] [I] +++ Script execution complete! +++

I've placed the ffmpeg in the same folder. could not get the same ffmpeg that was listed as its not found on the server

faithcsc commented 6 years ago

Try downloading the correct ffmpeg from this link: http://web.archive.org/web/20150923194006/https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20150418-git-edbb9b5-win64-static.7z

noiseloops commented 6 years ago

I have tried downloading this and place it in the same folder. doesn't work either. rather weird to be honest.

faithcsc commented 6 years ago

Think it may be due to a paths issue. Try the following:

  1. Extract the folder to Python27 so your Python27 folder contains the folder named "ffmpeg"
  2. Open \Python27\ffmpeg\ff-prompt.bat
  3. In the console, enter: "<path to the .py file>" Only the path to the .py file should contain quotes around it. so eg "C:\t.py" https://video.toggle.sg/en/series/my-friends-from-afar/ep25/557131 https://video.toggle.sg/en/series/tanglin/ep684/571329

Any downloaded files will be stored in \Python27\ffmpeg\bin\ Should fix path issues without having to add environment variables.

noiseloops commented 6 years ago

I'm still receiving the same error as below. I have a feeling it might be due to the script itself.

[I] Thread fad38979 completed [I] Thread fad38979: processing URL https://cc-toggle.akamaized.net/557131_DAQ17860_Chinese.srt libavutil 54. 22.101 / 54. 22.101 libavcodec 56. 34.100 / 56. 34.100 libavformat 56. 30.100 / 56. 30.100 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 14.100 / 5. 14.100 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 3.100 / 53. 3.100 [NULL @ 0000000005009660] Unable to find a suitable output format for 'http://video.toggle.sg/' http://video.toggle.sg/: Invalid argument Downloading: 557131_DAQ17860_Chinese.srt Bytes: 39878 Thread Downloaded Percentage -[------------------------------E] ffmpeg file not found, or existing file is for incorrect architecture, or download was interrupted prematurely.

[I] Thread 3a447269 completed [I] Thread fad38979 completed [I] +++ Script execution complete! +++

faithcsc commented 6 years ago

Try replacing the code with the code here: https://github.com/0x776b7364/toggle.sg-download/issues/49

noiseloops commented 6 years ago

That sort of did the trick! thanks!

although there are couple of these messages, the vid did complete downloading. [http @ 00000000069a52a0] the user-agent option is deprecated, please use user_agent option4x Last message repeated 1 times [http @ 00000000069ad000] the user-agent option is deprecated, please use user_agent option4x Last message repeated 1 times [http @ 00000000069a52a0] the user-agent option is deprecated, please use user_agent option Last message repeated 1 times [http @ 00000000069a9de0] the user-agent option is deprecated, please use user_agent option4x Last message repeated 1 times [http @ 00000000069a84c0] the user-agent option is deprecated, please use user_agent option4x Last message repeated 1 times [http @ 00000000069a2080] the user-agent option is deprecated, please use user_agent option4x Last message repeated 1 times [http @ 00000000069a9de0] the user-agent option is deprecated, please use user_agent option Last message repeated 1 times [http @ 00000000069ad000] the user-agent option is deprecated, please use user_agent option4x Last message repeated 1 times [http @ 00000000069ab6e0] the user-agent option is deprecated, please use user_agent option Last message repeated 1 times

0x776b7364 commented 6 years ago

Closed due to inactivity.