summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/plugins/hoster/OneFichierCom.py4
-rw-r--r--module/plugins/internal/SimpleHoster.py11
2 files changed, 7 insertions, 8 deletions
diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py
index 820a4609f..7847a11e9 100644
--- a/module/plugins/hoster/OneFichierCom.py
+++ b/module/plugins/hoster/OneFichierCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class OneFichierCom(SimpleHoster):
__name__ = "OneFichierCom"
__type__ = "hoster"
- __version__ = "0.72"
+ __version__ = "0.73"
__pattern__ = r'https?://(?:www\.)?(?:(?P<ID1>\w+)\.)?(?P<HOST>1fichier\.com|alterupload\.com|cjoint\.net|d(es)?fichiers\.com|dl4free\.com|megadl\.fr|mesfichiers\.org|piecejointe\.net|pjointe\.com|tenvoi\.com)(?:/\?(?P<ID2>\w+))?'
@@ -28,7 +28,7 @@ class OneFichierCom(SimpleHoster):
OFFLINE_PATTERN = r'File not found !\s*<'
- COOKIES = [(".1fichier.com", "LG", "en")]
+ COOKIES = [("1fichier.com", "LG", "en")]
WAIT_PATTERN = r'>You must wait (\d+)'
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 2562f0af3..18df2de92 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -170,10 +170,9 @@ def create_getInfo(plugin):
def getInfo(urls):
for url in urls:
if hasattr(plugin, "COOKIES") and isinstance(plugin.COOKIES, list):
- cj = CookieJar(plugin.__name__)
- set_cookies(cj, plugin.COOKIES)
+ set_cookies(plugin.req.cj, plugin.COOKIES)
else:
- cj = None
+ plugin.req.cj = None
if hasattr(plugin, "URL_REPLACEMENTS"):
url = replace_patterns(url, plugin.URL_REPLACEMENTS)
@@ -182,11 +181,11 @@ def create_getInfo(plugin):
url = replace_patterns(url, plugin.FILE_URL_REPLACEMENTS)
if hasattr(plugin, "TEXT_ENCODING"):
- html = getURL(url, cookies=bool(cj), decode=not plugin.TEXT_ENCODING)
+ html = plugin.load(url, decode=not plugin.TEXT_ENCODING, cookies=bool(plugin.COOKIES))
if isinstance(plugin.TEXT_ENCODING, basestring):
html = unicode(html, plugin.TEXT_ENCODING)
else:
- html = getURL(url, cookies=bool(cj), decode=True)
+ html = plugin.load(url, decode=True, cookies=bool(plugin.COOKIES))
yield parseFileInfo(plugin, url, html)
@@ -200,7 +199,7 @@ def timestamp():
class SimpleHoster(Hoster):
__name__ = "SimpleHoster"
__type__ = "hoster"
- __version__ = "0.54"
+ __version__ = "0.55"
__pattern__ = r'^unmatchable$'