wetcork / raiplay-dl

The most advanced raiplay.it downloader
MIT License
35 stars 6 forks source link

No format has been found for the given title #4

Open Sp4c3fl0w opened 2 years ago

Sp4c3fl0w commented 2 years ago

Hi, Tried to download these new series tv episodes, compared to the last time, where episode 1 and 2 were downloaded perfeclty, it returned this "no format found" error. Could be temporary because even with the direct link it returns the same, but I did not understand why..

python raiplay-dl.py https://www.raiplay.it/programmi/sopravvissuti -s 1 -e 3,4
Downloading "Sopravvissuti (2022)"

[Season 1]
[error] No format has been found for the given title
[error] No format has been found for the given title

python raiplay-dl.py https://www.raiplay.it/video/2022/10/Sopravvissuti-S1E3-Alla-deriva-1bf1a7e6-fe26-4bb8-a26b-65d6dc681e1c.html
[error] No format has been found for the given title
wetcork commented 2 years ago

Sembra che le versioni del file mp4 di questa serie siamo offline/non accessibili per qualche motivo, ho controllato e non hanno il DRM quindi non il problema non è quello. In questi giorni indago e cerco di capire il problema (qui il link diretto alla versione 1080p del primo episodio non accessibile).

drego85 commented 1 year ago

È veramente strano, RaiPlay indica di accedere al contenuto tramite creativemedia9-rai-it o creativemedia8-rai-it ma di fatto questi due web server non contengono il file MP4.

Realmente è disponibile su creativemedia6-rai-it o creativemedia7-rai-it.

Per riprodurre la risposta di Rai Play:

$ curl "https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=Baord6wGXAtBOnUPomKvJQeeqqEEqualeeqqEEqual&overrideUserAgentRule=mp4-5000" -I

wetcork commented 1 year ago

È veramente strano, RaiPlay indica di accedere al contenuto tramite creativemedia9-rai-it o creativemedia8-rai-it ma di fatto questi due web server non contengono il file MP4.

Realmente è disponibile su creativemedia6-rai-it o creativemedia7-rai-it.

Per riprodurre la risposta di Rai Play:

$ curl "https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=Baord6wGXAtBOnUPomKvJQeeqqEEqualeeqqEEqual&overrideUserAgentRule=mp4-5000" -I

Interessante scoperta, potrei aggiungere un controllo generale in caso un link sia offline che passa a rassegna tutti i server da creativemedia1-rai-it a creativemedia9-rai-it prima di dare errore. Per qualche motivo non sembra esistere creativemedia5-rai-it.

drego85 commented 1 year ago

Stavo guardando lo script Rai Play video download di @Lazza e se ho ben letto il codice JS lui si crea un array con tutti i possibili dominii che distribuiscono il contenuto e poi verifica quali di essi contiene realmente il file MP4.

L'array è attualmente composto dai seguenti server:

creativemedia1.rai.it
creativemedia2.rai.it
creativemedia3.rai.it
creativemedia4.rai.it
creativemedia6-rai-it.akamaized.net
creativemedia7-rai-it.akamaized.net
creativemedia8-rai-it.akamaized.net
creativemedia9-rai-it.akamaized.net
download2.rai.it
download2-geo.rai.it
creativemediax1.rai.it
creativemediax2.rai.it
Lazza commented 1 year ago

La maggior parte dei video nuovi non ha MP4 ma solo flussi HLS, indicizzati nei rispettivi M3U8.

Peraltro parliamo di flussi in cui ci sono tracce solo video e altre solo audio, con italiano e audiodescrizione. Questo progetto se non altro ha il vantaggio che è fatto in Python e non gira nel browser, quindi può "facilmente" gestire anche i flussi HLS e il relativo muxing delle due tracce.

wetcork commented 1 year ago

A quanto pare è proprio così, vorrà dire che mi metterò a lavorare per aggiungere le funzioni di muxing per le varie qualità video.

atrasatti commented 1 year ago

Penso sia lo stesso problema. Oggi ho provato i seguenti download di diversi programmi:

python3 raiplay-dl.py https://www.raiplay.it/programmi/peppapig -F Formats avaiable for "Peppa Pig (2011)"

python3 raiplay-dl.py https://www.raiplay.it/video/2017/02/Sulle-tracce-della-tigre---Geo-del-27022017-51897926-a47b-41b6-8f01-275e3fb1c158.html [error] No format has been found for the given title

Lazza commented 1 year ago
http://creativemedia6-rai-it.akamaized.net/podcastcdn/raitre_2/Geo/Geo_EP_Puntate/6653719_1800.mp4
http://creativemedia6-rai-it.akamaized.net/podcastcdn/raitre_2/Geo/Geo_EP_Puntate/6653719_800.mp4
wetcork commented 1 year ago

Ho iniziato a riscrivere da capo lo script in questi giorni per ottimizzarlo e aggiungere eventualmente il download via flussi HLS, risolverò tutti i problemi con la nuova release.

ElCap13 commented 1 year ago

no need to rewrite the script, just add this to all requests to "override_url" or "url_override" headers={'user-agent': 'Rai'}

example: r = requests.get(override_url, headers={'user-agent': 'Rai'}, stream=True)

(and of course add it to the download function)

reproduce with curl curl "https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=Baord6wGXAtBOnUPomKvJQeeqqEEqualeeqqEEqual&overrideUserAgentRule=mp4-5000" -I -H "User-agent: Rai"

wetcork commented 1 year ago

no need to rewrite the script, just add this to all requests to "override_url" or "url_override" headers={'user-agent': 'Rai'}

example: r = requests.get(override_url, headers={'user-agent': 'Rai'}, stream=True)

(and of course add it to the download function)

reproduce with curl curl "https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=Baord6wGXAtBOnUPomKvJQeeqqEEqualeeqqEEqual&overrideUserAgentRule=mp4-5000" -I -H "User-agent: Rai"

Hi, thanks for the fix but i already know that was the problem, but is only a part because i found some other errors for example when parsing the json. Anyway, i'm rewriting the script for optimization and to add new features, not only to fix this problem.

ElCap13 commented 1 year ago

No worries, I thought it might be a quick fix until you release the new version 🙂

3052 commented 4 months ago

note the fix from @latoile does not work