summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-07 16:51:14 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-07 16:51:14 +0200
commit1cfc960fd3ec384364ffb1e09d3ee98fc657eddb (patch)
treec0fda55382acc0147feb731a028456ac3e9c78ae /module/plugins/internal
parent[YadiSk] Cleanup (diff)
downloadpyload-1cfc960fd3ec384364ffb1e09d3ee98fc657eddb.tar.xz
[SimpleDereferer][SimpleHoster] Update user-agent
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/SimpleDereferer.py3
-rw-r--r--module/plugins/internal/SimpleHoster.py6
2 files changed, 6 insertions, 3 deletions
diff --git a/module/plugins/internal/SimpleDereferer.py b/module/plugins/internal/SimpleDereferer.py
index 360cd7c30..41c6aa985 100644
--- a/module/plugins/internal/SimpleDereferer.py
+++ b/module/plugins/internal/SimpleDereferer.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import getFileURL, set_cookies
class SimpleDereferer(Crypter):
__name__ = "SimpleDereferer"
__type__ = "crypter"
- __version__ = "0.08"
+ __version__ = "0.09"
__pattern__ = r'^unmatchable$'
__config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True),
@@ -70,6 +70,7 @@ class SimpleDereferer(Crypter):
self.html = ""
self.req.setOption("timeout", 120)
+ self.req.http.c.setopt(pycurl.USERAGENT, "Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0")
if isinstance(self.COOKIES, list):
set_cookies(self.req.cj, self.COOKIES)
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 6f1c7409d..4446eed00 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -3,6 +3,7 @@
import datetime
import mimetypes
import os
+import pycurl
import re
import time
import urllib2
@@ -247,7 +248,7 @@ def secondsToMidnight(gmt=0):
class SimpleHoster(Hoster):
__name__ = "SimpleHoster"
__type__ = "hoster"
- __version__ = "1.33"
+ __version__ = "1.34"
__pattern__ = r'^unmatchable$'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -315,7 +316,7 @@ class SimpleHoster(Hoster):
@classmethod
- def parseInfos(cls, urls): #@TODO: Built-in in 0.4.10 core, then remove from plugins
+ def parseInfos(cls, urls): #@TODO: Built-in in 0.4.10 core (remove from plugins)
for url in urls:
url = replace_patterns(url, cls.URL_REPLACEMENTS)
yield cls.getInfo(url)
@@ -433,6 +434,7 @@ class SimpleHoster(Hoster):
self.fail(_("Required account not found"))
self.req.setOption("timeout", 120)
+ self.req.http.c.setopt(pycurl.USERAGENT, "Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0")
if isinstance(self.COOKIES, list):
set_cookies(self.req.cj, self.COOKIES)