Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rai] Raiplaysound support, fixes #1951 #1955

Merged
merged 10 commits into from
Jan 10, 2022
Merged

Conversation

nixxo
Copy link
Contributor

@nixxo nixxo commented Dec 10, 2021

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense

What is the purpose of your pull request?

  • Improvement

Description of your pull request and other information

add support for raiplaysound.it, single episode and playlists

fixes #1951

Drafted as I still have to check code for live streams.

@nixxo nixxo changed the title [rai] Raiplayradio fix [rai] Raiplaysound support, fixes #1951 Dec 10, 2021
@nixxo nixxo marked this pull request as draft December 10, 2021 19:56
@nixxo nixxo force-pushed the raiplayradio-fix branch 3 times, most recently from bc53f07 to 9c746b1 Compare December 10, 2021 21:10
@nixxo nixxo marked this pull request as ready for review December 10, 2021 21:13
@r-ricci
Copy link

r-ricci commented Dec 10, 2021

It works mostly, thank you.
Some playlists, such as https://www.raiplaysound.it/playlist/suoneriesumisura and https://www.raiplaysound.it/audiolibri/16ottobre1943, are handled by the generic extractor and cannot be downloaded. Maybe a more generic regex could fix this?

@pukkandan pukkandan added site-bug Issue with a specific website pending-review PR needs a review labels Dec 12, 2021
@bendreth
Copy link

I tried to use this version with the following: https://www.raiplaysound.it/programmi/lilloegreg610/puntate/stagione-2020-21
However, it reports only 27 files out of 70 or so in the playlist.

@r-ricci
Copy link

r-ricci commented Dec 12, 2021

I tried to use this version with the following: https://www.raiplaysound.it/programmi/lilloegreg610/puntate/stagione-2020-21 However, it reports only 27 files out of 70 or so in the playlist.

It looks like the url regex ignores the part of the url after the programme name and always extracts the same id. Those 27 files actually belong to https://www.raiplaysound.it/programmi/lilloegreg610. The proper location of the json document for older seasons is listed inside the main json, at "filters"[index] -> "path_id".

raiplay.it has the same bug:

$ yt-dlp -g --playlist-items 1-3 'https://www.raiplay.it/programmi/superquarkpiu/stagione-2019/stagione-2019' | md5sum
41e1e9d0b0794e9f5ba748fabf9696d6  -

$ yt-dlp -g --playlist-items 1-3 'https://www.raiplay.it/programmi/superquarkpiu/stagione-2020/stagione-2020' | md5sum
41e1e9d0b0794e9f5ba748fabf9696d6  -

@bendreth
Copy link

Perfect, thanks! 👌

@nixxo
Copy link
Contributor Author

nixxo commented Dec 12, 2021

@4ricci For raiplay it's a little more tricky. I'll have to look into it.

yt_dlp/extractor/rai.py Outdated Show resolved Hide resolved
@nixxo
Copy link
Contributor Author

nixxo commented Dec 15, 2021

@pukkandan as suggested by @4ricci another class in this extractor lacked support for sub playlist (like the one in bacc702). Is it ok If I commit here or should I do a separate PR?

@pukkandan
Copy link
Member

you can add it to this PR

- added the ability to extract only subplaylist in it matches the url
- improved title extraction to match the extracted subplaylist
@nixxo
Copy link
Contributor Author

nixxo commented Dec 16, 2021

@4ricci now it should be complete.

@pukkandan pukkandan merged commit 0df11da into yt-dlp:master Jan 10, 2022
@nixxo nixxo deleted the raiplayradio-fix branch October 20, 2022 09:46
@bashonly bashonly removed the pending-review PR needs a review label Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-bug Issue with a specific website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

raiplayradio.it moved to raiplaysound.it; website structure changed
5 participants