projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9493ffd
)
[Telegraaf] Use mobile GraphQL API endpoint
author
coletdjnz
<coletdjnz@protonmail.com>
Fri, 23 Sep 2022 00:10:35 +0000
(12:10 +1200)
committer
dirkf
<fieldhouse@gmx.net>
Tue, 4 Oct 2022 10:43:08 +0000
(11:43 +0100)
Workaround for Cloudflare 403
Fixes https://github.com/yt-dlp/yt-dlp/issues/5000
Authored by: coletdjnz
youtube_dl/extractor/telegraaf.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/telegraaf.py
b/youtube_dl/extractor/telegraaf.py
index 2dc0205373a87381663fd655cf5512e8cfcdeaed..5174898f2ab0da614c731ebd6a82234ca5b90f73 100644
(file)
--- a/
youtube_dl/extractor/telegraaf.py
+++ b/
youtube_dl/extractor/telegraaf.py
@@
-34,7
+34,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 {