]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[udemy] Fix course enroll (Closes #9393)
authorSergey M․ <dstftw@gmail.com>
Wed, 4 May 2016 17:03:44 +0000 (23:03 +0600)
committerSergey M․ <dstftw@gmail.com>
Wed, 4 May 2016 17:03:44 +0000 (23:03 +0600)
youtube_dl/extractor/udemy.py

index d1e6f2703e022dac0edc3ef0f16794a6285d2b8f..7ebd231f0afe2041eded90345870e087c36c580c 100644 (file)
@@ -84,7 +84,8 @@ class UdemyIE(InfoExtractor):
         if enroll_url:
             webpage = self._download_webpage(
                 combine_url(base_url, enroll_url),
-                course_id, 'Enrolling in the course')
+                course_id, 'Enrolling in the course',
+                headers={'Referer': base_url})
             if '>You have enrolled in' in webpage:
                 self.to_screen('%s: Successfully enrolled in the course' % course_id)