Skip to content

Commit

Permalink
Merge pull request #601 from bloerwald/fix_youtube_video_info_query
Browse files Browse the repository at this point in the history
XMLConverter: fix: youtube/get_video_info 404s without &html5=1 these days
  • Loading branch information
moodyblue committed Jun 13, 2021
2 parents 2d31efe + 71527b0 commit 5528a55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion XMLConverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def XML_PMS2aTV(PMS_address, path, options):

elif cmd=='PlayTrailer':
trailerID = options['PlexConnectTrailerID']
info = urllib2.urlopen("https://youtube.com/get_video_info?video_id=" + trailerID).read()
info = urllib2.urlopen("https://youtube.com/get_video_info?html5=1&video_id=" + trailerID).read()
parsed = urlparse.parse_qs(info)

key = 'player_response'
Expand Down

1 comment on commit 5528a55

@bloerwald
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: this is broken again. I suggest using some library for this, e.g. https://github.com/pytube/pytube (needs py3/#607).

Please sign in to comment.