warren-bank / node-hls-downloader-tubitv

Command-line utility for downloading an offline copy of TubiTV HLS video streams.
GNU General Public License v2.0
63 stars 8 forks source link

Error: Cannot parse format of TubiTV Url #5

Closed Doggert closed 2 years ago

Doggert commented 2 years ago

Well, as the title says, i tried to download an episode and it didnt work so i tried the example and that didnt work aswell, so i'm asking here for help. https://imgur.com/a/iNKMoMH

warren-bank commented 2 years ago

Thanks for reporting; I'll fix this..

The problem is that:

  curl -I "https://tubitv.com/tv-shows/498780/s01_e02_the_grand_deception_part_2"

returns:

  HTTP/2 301
  location: /tv-shows/498780/s01-e02-the-grand-deception-part-2

using the URL before 301 redirect:

  tubidl -dr -ll 3 -u "https://tubitv.com/tv-shows/498780/s01_e02_the_grand_deception_part_2"

returns:

  Error: empty server response at URL: 'https://tubitv.com/tv-shows/498780/s01_e02_the_grand_deception_part_2'

using the URL after 301 redirect:

  tubidl -dr -ll 3 -u "https://tubitv.com/tv-shows/498780/s01-e02-the-grand-deception-part-2"

returns:

  processing page:
    https://tubitv.com/tv-shows/498780/s01-e02-the-grand-deception-part-2
  type:
    episode
  HLS manifest:
    https://manifest.production-public.tubi.io/478adb50-2ae6-447a-8b36-d52b8b134e6
  9/9yovecujsn.m3u8?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjZG5fcHJlZml4Ijo
  iaHR0cHM6Ly9ha2FtYWkudHViaS52aWRlbyIsImNvdW50cnkiOiJVUyIsImRldmljZV9pZCI6IjdhNGF
  hYTZhLTg4NTUtNDBjMi05YWI3LWIwNjA0MmRkN2IxZSIsImV4cCI6MTY2MDUyNzkwMCwiZXhwZXJpbWV
  udCI6eyJuYW1lIjoidGl0YW5fcmVzb2x1dGlvbl8xMDgwcF93ZWIiLCJuYW1lc3BhY2UiOiJ0aXRhbl9
  yZXNvbHV0aW9uXzEwODBwX3dlYiIsInRyZWF0bWVudCI6InJlc29sdXRpb25fMTA4MHAifSwicGxhdGZ
  vcm0iOiJXRUIiLCJ1c2VyX2lkIjowfQ.bbupTft4Z1EHrXPTWJpauCunc2dup1gge5-5Oq_wgDE&mani
  fest=true
  output directory:
    C:\workspace\911 Ten Years of Deception\S01E02 - The Grand Deception, Part 2

  mp4 conversion:
    cd "C:\workspace\911 Ten Years of Deception\S01E02 - The Grand Deception, Pa
  rt 2\hls" && mkdir "..\mp4" & ffmpeg -allowed_extensions ALL -i "master.m3u8" -c
   copy -movflags +faststart "..\mp4\video.mp4"

Sufficed to say.. this redirection is new.. and my client doesn't like it. It should be very easy to add support for this.. TBA.

warren-bank commented 2 years ago

The funny thing is..

Strictly speaking, the package-lock.json file (in the repo) is over 3 years old and refers to dependencies that should be updated. But when I just did a fresh global install, this error goes away.. so I guess package-lock.json is ignored? In case you need it, this package-lock.json file (attached to issue) was generated by a fresh npm install.

This additional comment is going to be a bit in the weeds.. and you can ignore it, but I will also point out (in case you're looking at the contents of package-lock.json and comparing to the most recent tags of the various dependencies).. that node-request-cli is intentionally using v3.x rather than v4.x because v4.x adds a ton of great features at the cost of requiring a few new dependencies.. none of which are required by this utility.. so it's better to use v3.x and save the added weight.