Skip to content

Instantly share code, notes, and snippets.

@rtfpessoa
Last active July 17, 2023 09:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtfpessoa/075cd382d88fd39719c340043aaae4e4 to your computer and use it in GitHub Desktop.
Save rtfpessoa/075cd382d88fd39719c340043aaae4e4 to your computer and use it in GitHub Desktop.
TVI Player Downloader
#!/usr/bin/env bash
set -eux
for SEASON_NUMBER in 1 2; do
for EPISODE_NUMBER in 1 2; do
EPISODE_URL="http://tviplayer.iol.pt/programa/pesadelo-na-cozinha/58bd77b50cf26a3bdcfca690/episodio/t${SEASON_NUMBER}e${EPISODE_NUMBER}"
PLAYLISTS_BY_QUALITY_URLS=$(curl -L $EPISODE_URL 2>/dev/null | grep 'vod/_definst_' | awk -F, '{print $3}' | sed -E 's/"videoUrl":"(.*)"/\1/')
youtube-dl -f best --audio-quality 0 -o pesadelo-na-cozinha-S01E0${EPISODE_NUMBER}.ts --prefer-ffmpeg $PLAYLISTS_BY_QUALITY_URLS &
done
done
wait
@malaquias63
Copy link

doesn't work anymore
the curl on the link will return empty value

@rtfpessoa
Copy link
Author

The greps and replaces make this very flaky. I could change to jq but that would require the new dep and I have not even been using this now.

I did a quick fix for you. Try it now.

@malaquias63
Copy link

ok sorry i saw the problem,
Problem was on cookie ;)
Thanks it's working

@malaquias63
Copy link

unfortunately it doesn't work again i think they changed the streaming function

@GOvEy1nw
Copy link

hi @rtfpessoa could you confirm if this still works please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment