-
Notifications
You must be signed in to change notification settings - Fork 10k
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
la1ere: french overseas (9 regions) public and free #32713
Comments
I used a VPN to set my location as France so I could access. What I saw is that the video is streamed by the player a chunk at a time using URLs like this: (first chunk)
(second chunk)
I don't know if youtube-dl can download a video without a link to a single resource, especially I'm not sure whether we can reconstruct how to query these |
yt-dl knows how to deal with fragment manifests, whether HLS (m3u8) or DASH (mpd). If, as with On:ORF, eg, a site may serve a single show as multiple parts, the site extractor has to return a For this site we have to reverse-engineer the site's behaviour because there are no media links in the non-JS page that yt-dl receives. In the browser tools network tab, look for a request by XHR for a DASH manifest, before the video starts to stream. If that URL can be reconstructed from information available in the page URL or the page itself, then it should be possible to create an extractor, provided that the video is not DRM-encrypted (does it play in a browser with DRM aka EME disabled?). My initial impression from the page source is that the site geo-blocks outside FR and its remnant empire. The .dash URLs are giving me 403 but may just have expired. |
@dirkf ah, ok that's good to know. I'm definitely new to the project so I'm glad you're here with such info. SO, There is a request to a For the page
Let's break this up into parts:
`?hdnea=exp=1722271524~acl=%2f*~hmac=c294fe8aaae7faaa23735f371a367deb6a6365d6638b6fd8201c9bd83a2cb414`` - these query params include an HMAC which is a bit scary as we'd have to figure out how this is generated... and it seems to be happening inside the magnetoscope player code. If you request the tl;dr: requesting the |
Hmm, I just found something else. (reference URL is https://la1ere.francetvinfo.fr/martinique/programme-video/diffusion/4774522-origine-kongo.html) The entire
This returns:
Exactly what we need. So, if we can chef up this URL we can get the We need therefore to be able to find/generate:
|
OK, so we need
To request the URL for the We can generate this URL by parsing the response from
Which only requires Querying this URL will return a JSON object where
From which we can construct the key request. Now, I've tried querying without all the various params, and it seems to need them. Troubling is the |
@dirkf even if I did write an extractor for this, the tests would always fail without a France VPN. Does that alone kill this exporter? Or could we publish it without tests - but then, how would we know when it breaks... |
Normally someone in the relevant region, or who has a VPN so as to appear so, is both sufficiently interested and sufficiently skilled to work on the extractor. If any extractor tests can't be run outside the region, the author should post a transcript showing the tests working and then disable them. OP suggested that this site is like FranceTV, so it may be possible to use the yt-dlp FranceTV extractor (I suspect that ours is broken) as a basis, or just to add a new extractor class in the FranceTV extractor. The The JSON seems to have a good set of metadata. Maybe some specific headers are needed to get the DASH manifest without Akamai "blocage", or maybe just an acceptable IP address. |
@dirkf ah, i thought the tests were run on every extractor before every release - i guess they're just run when merging the pull request? I've got a free france VPN set up for this so I can try to work on it |
There's no point scheduling a test that will always fail so the test-case will typically include |
I wrote an extractor for both URL formats in the original request. Tested on my end using a france VPN and both work to download the video. @dirkf could you confirm that nothing is needed to download an mpd/m3u8 resource other than returning |
In yt-dl, use the appropriate Check what happens in other extractors, and especially in yt-dlp's FranceTV extractor. |
@dirkf could you expand no the http_headers part of that? i don't see any example of that in the francetv extractor, it just extracts and sorts the formats. Thanks in advance, I know i've been blowing u up lately |
It may not be relevant here. If requests for the URLs in the Supposing requests need to be passed with a for f in formats:
f.setdefault('http_headers', {})['Referer'] = url A content search of *.py for |
CONTEXT
French overseas public channels are available without authentication from the portal : https://la1ere.francetvinfo.fr/
Apparently, all formats/manifests are the same as those from france.tv (extractor francetv.py):
indeed, a few videos are even shared by both sites.
For its developers, it should be straightforward to derive a new extractor la1ere.py from francetv.py (only two URL templates/pages embed videos) - i really hope my feeling is right, and would gladly help if i had some knowledge in video streams and python.
The video offer is free, very large and covers documentaries, news, fictions of many cultures. It would be a nice gift for those interested in those, as internet speed may be slow overseas, preventing streaming :)
9 regions are covered (below, refers to one of)
Here is the mosaic of videos available for the chosen region:
https://la1ere.francetvinfo.fr/REGION/programme-video/
(as said before, a few of them are also available at: https://www.france.tv/la1ere/REGION/toutes-les-videos/)
TEMPLATES OF EMBEDDING URLs
In the end, final pages embedding videos may have 2 paths only:
The latter is used for series, news ...
The extractor may be flexible and even not consider/whitelist the region list, letting it be free (prophylaxis/evolutions), as the substring "/diffusion/" already filters templates.
EXAMPLES:
Documentary:
https://la1ere.francetvinfo.fr/martinique/programme-video/diffusion/4774522-origine-kongo.html
News:
https://la1ere.francetvinfo.fr/guadeloupe/programme-video/la1ere_guadeloupe_le-13h-en-guadeloupe/diffusion/5643549-emission-du-lundi-29-janvier-2024.html
The text was updated successfully, but these errors were encountered: