Skip to content

Commit

Permalink
[Telegraaf] Use mobile GraphQL API endpoint
Browse files Browse the repository at this point in the history
Workaround for Cloudflare 403
Fixes yt-dlp/yt-dlp#5000
Authored by: coletdjnz
  • Loading branch information
coletdjnz authored and dirkf committed Oct 4, 2022
1 parent 9493ffd commit d35557a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion youtube_dl/extractor/telegraaf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ def _real_extract(self, url):
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 {
Expand Down

0 comments on commit d35557a

Please sign in to comment.