about summary refs log tree commit diff
path: root/youtube_dl/extractor/funimation.py
diff options
context:
space:
mode:
authorSergey M? <dstftw@gmail.com>2015-12-11 21:34:30 +0600
committerSergey M․ <dstftw@gmail.com>2015-12-11 23:00:37 +0600
commit59a4ff482a330ddf241ca4606aed66b5d029c055 (patch)
tree23457581c48f3dbdcf7b2abc000062ecf521ea0a /youtube_dl/extractor/funimation.py
parent40ca5b04f4845d3ab334d6cc9fb0272fe25df8b3 (diff)
downloadyoutube-dl-59a4ff482a330ddf241ca4606aed66b5d029c055.tar.gz
youtube-dl-59a4ff482a330ddf241ca4606aed66b5d029c055.tar.xz
youtube-dl-59a4ff482a330ddf241ca4606aed66b5d029c055.zip
[funimation] Real UA is required for login
Diffstat (limited to 'youtube_dl/extractor/funimation.py')
-rw-r--r--youtube_dl/extractor/funimation.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/extractor/funimation.py b/youtube_dl/extractor/funimation.py
index 74923c3cf..d0759f3b6 100644
--- a/youtube_dl/extractor/funimation.py
+++ b/youtube_dl/extractor/funimation.py
@@ -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)