-
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
[ITV] ERROR: Unable to extract params ('Unable to extract %s' % _name) #32410
Comments
@xaoscience, no: read #30839 as asked. #22638 hasn't got anything to do with ITV. Unfortunately the ITV[x] page structure has changed. The desired playlist URL can now be found with this: --- old/youtube_dl/extractor/itv.py
+++ new/youtube_dl/extractor/itv.py
@@ -189,14 +189,19 @@
webpage = self._download_webpage(url, video_id)
- # now quite different params!
- params = extract_attributes(self._search_regex(
- r'''(<[^>]+\b(?:class|data-testid)\s*=\s*("|')genie-container\2[^>]*>)''',
- webpage, 'params'))
-
- ios_playlist_url = traverse_obj(
- params, 'data-video-id', 'data-video-playlist',
- get_all=False, expected_type=url_or_none)
+ ios_playlist_url = url_or_none(self._search_regex(
+ r'''\bplaylistUrl['"]\s*:\s*(?P<q>"|')(?P<url>https?://magni\.itv\.com/playlist/(?:(?!(?=q)).)+)''',
+ webpage, 'playlist URL', group='url', fatal=False))
+
+ if not ios_playlist_url:
+ # legacy: does it ever happen?
+ params = extract_attributes(self._search_regex(
+ r'''(<[^>]+\b(?:class|data-testid)\s*=\s*("|')genie-container\2[^>]*>)''',
+ webpage, 'params'))
+
+ ios_playlist_url = traverse_obj(
+ params, 'data-video-id', 'data-video-playlist',
+ get_all=False, expected_type=url_or_none)
headers = self.geo_verification_headers()
headers.update({ Again unfortunately, then we get 404 ...
[ITV] 1a7842a1903: Downloading webpage
[ITV] 1a7842a1903: Downloading JSON metadata
ERROR: Unable to download JSON metadata: HTTP Error 404: Not Found ... when fetching the data with the URL. Perhaps @Vangelis66 can advise on how, or if at all, the POST to the playlist URL can be modified so as to return valid data. |
I ran into this yesterday. I believe the issue is the variantAvailability parameter. Currently it is sending:
This returns 404 and the following message:
The desktop web client sends:
But the response from this doesn't allow the download to work. FWIW I think this 404 might only apply to newer shows. It fails for But the original POST params work for the built in test case: |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
The desktop client is tied into the DRM stuff. We pretend to be an old mobile, hence |
Checklist
Verbose log
Description
I'm trying to download videos from ITV, however, each time I try (regardless of the video), I get an "unable to extract params" error. I am using the latest master. I can watch any of the shows through the browser without issue.
Only similar issue I've been able to find is #22638 which does not give a fix
The text was updated successfully, but these errors were encountered: