]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[funimation] Real UA is required for login
authorSergey M? <dstftw@gmail.com>
Fri, 11 Dec 2015 15:34:30 +0000 (21:34 +0600)
committerSergey M․ <dstftw@gmail.com>
Fri, 11 Dec 2015 17:00:37 +0000 (23:00 +0600)
youtube_dl/extractor/funimation.py

index 74923c3cf4568f91dbb32abb7453b1d1f77a4e49..d0759f3b6f2aa244e8d3bb98c3daf63e5eebd16e 100644 (file)
@@ -34,8 +34,10 @@ class FunimationIE(InfoExtractor):
             'email_field': username,
             'password_field': password,
         }))
-        login_request = sanitized_Request(login_url, data)
-        login_request.add_header('Content-Type', 'application/x-www-form-urlencoded')
+        login_request = sanitized_Request(login_url, data, headers={
+            'User-Agent': 'Mozilla/5.0 (Windows NT 5.2; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0',
+            'Content-Type': 'application/x-www-form-urlencoded'
+        })
         try:
             login = self._download_webpage(
                 login_request, None, 'Logging in as %s' % username)