aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcoletdjnz <coletdjnz@protonmail.com>2022-09-23 12:10:35 +1200
committercoletdjnz <coletdjnz@protonmail.com>2022-09-23 12:10:35 +1200
commit32972518da55934f7ccf7960f788363d5700da5e (patch)
treed86e47a67cc85bdb48bb6b01d44140d1b67ff20c
parent2e7675489f4323c17c8de1e1fd264365c2c36e26 (diff)
downloadhypervideo-pre-32972518da55934f7ccf7960f788363d5700da5e.tar.lz
hypervideo-pre-32972518da55934f7ccf7960f788363d5700da5e.tar.xz
hypervideo-pre-32972518da55934f7ccf7960f788363d5700da5e.zip
[extractor/telegraaf] Use mobile GraphQL API endpoint
Workaround for Cloudflare 403 Fixes https://github.com/yt-dlp/yt-dlp/issues/5000 Authored by: coletdjnz
-rw-r--r--yt_dlp/extractor/telegraaf.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/yt_dlp/extractor/telegraaf.py b/yt_dlp/extractor/telegraaf.py
index bc9a8d608..6562d122c 100644
--- a/yt_dlp/extractor/telegraaf.py
+++ b/yt_dlp/extractor/telegraaf.py
@@ -31,7 +31,9 @@ class TelegraafIE(InfoExtractor):
article_id = self._match_id(url)
video_id = self._download_json(
- 'https://www.telegraaf.nl/graphql', article_id, query={
+ 'https://app.telegraaf.nl/graphql', article_id,
+ headers={'User-Agent': 'De Telegraaf/6.8.11 (Android 11; en_US)'},
+ query={
'query': '''{
article(uid: %s) {
videos {