Преглед на файлове

[udemy] Fix course enroll (Closes #9393)

Sergey M․ преди 9 години
родител
ревизия
aabdc83d6e
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      youtube_dl/extractor/udemy.py

+ 2 - 1
youtube_dl/extractor/udemy.py

@@ -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)