1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-09-16 07:42:24 +02:00

[mixcloud] support older urllib versions

This commit is contained in:
Philip Huppert 2016-04-09 22:20:16 +02:00
parent f896e1ccef
commit dcaf00fb3e

View File

@ -171,7 +171,7 @@ def _fetch_tracks(self, base_url, video_id, dl_note=None, dl_errnote=None):
while True:
# fake a AJAX request to retrieve a list fragment
page_url = base_url + "?page=%d&list=main&_ajax=1" % current_page
req = compat_urllib_request.Request(page_url, headers={"X-Requested-With": "XMLHttpRequest"}, method="GET")
req = compat_urllib_request.Request(page_url, headers={"X-Requested-With": "XMLHttpRequest"})
resp = self._download_webpage(req, video_id, note=dl_note + " (page %d)" % current_page, errnote=dl_errnote)
# extract all track URLs from fragment