From a72688b208ed4ba3e98234e995f7bc1eb4afec42 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Mon, 16 Jan 2012 20:44:19 +0100 Subject: merge in plugin updates --- module/plugins/accounts/Premium4Me.py | 27 +++++ module/plugins/hoster/BezvadataCz.py | 4 +- module/plugins/hoster/EasybytezCom.py | 4 +- module/plugins/hoster/EuroshareEu.py | 2 +- module/plugins/hoster/FilepostCom.py | 105 ++++++++++------- module/plugins/hoster/FilesonicCom.py | 15 +-- module/plugins/hoster/FourSharedCom.py | 4 +- module/plugins/hoster/HotfileCom.py | 9 +- module/plugins/hoster/LetitbitNet.py | 64 +++++------ module/plugins/hoster/MediafireCom.py | 59 ++++++---- module/plugins/hoster/MegauploadCom.py | 11 +- module/plugins/hoster/MultishareCz.py | 14 +-- module/plugins/hoster/OneFichierCom.py | 130 +++++---------------- module/plugins/hoster/Premium4Me.py | 58 ++++++++++ module/plugins/hoster/UlozTo.py | 192 ++++++++++++++++---------------- module/plugins/hoster/WuploadCom.py | 7 +- module/plugins/internal/SimpleHoster.py | 43 +++++-- 17 files changed, 409 insertions(+), 339 deletions(-) create mode 100644 module/plugins/accounts/Premium4Me.py create mode 100644 module/plugins/hoster/Premium4Me.py (limited to 'module') diff --git a/module/plugins/accounts/Premium4Me.py b/module/plugins/accounts/Premium4Me.py new file mode 100644 index 000000000..6a52cb61a --- /dev/null +++ b/module/plugins/accounts/Premium4Me.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +from module.plugins.MultiHoster import MultiHoster + +class Premium4Me(MultiHoster): + __name__ = "Premium4Me" + __version__ = "0.10" + __type__ = "account" + __description__ = """Premium4.me account plugin""" + __author_name__ = ("RaNaN", "zoidberg") + __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz") + + def loadAccountInfo(self, req): + traffic = req.load("http://premium4.me/api/traffic.php?authcode=%s" % self.authcode) + + account_info = {"trafficleft": int(traffic) / 1024, "validuntil": -1} + + return account_info + + def login(self, req): + self.authcode = req.load("http://premium4.me/api/getauthcode.php?username=%s&password=%s" % (self.loginname, self.password)).strip() + + if "wrong username" in self.authcode: + self.wrongPassword() + + def loadHosterList(self, req): + page = req.load("http://premium4.me/api/hosters.php?authcode=%s" % self.authcode) + return [x.strip() for x in page.replace("\"", "").split(";")] \ No newline at end of file diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py index f061fa2b5..a0717ad64 100644 --- a/module/plugins/hoster/BezvadataCz.py +++ b/module/plugins/hoster/BezvadataCz.py @@ -23,13 +23,13 @@ class BezvadataCz(SimpleHoster): __name__ = "BezvadataCz" __type__ = "hoster" __pattern__ = r"http://(\w*\.)*bezvadata.cz/stahnout/.*" - __version__ = "0.22" + __version__ = "0.23" __description__ = """BezvaData.cz""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") FILE_NAME_PATTERN = r'

Soubor: (?P[^<]+)

' - FILE_SIZE_PATTERN = r'
  • Velikost: (?P[0-9.]+) (?P[kKMG])i?)
  • ' + FILE_SIZE_PATTERN = r'
  • Velikost: (?P[^<]+)
  • ' FILE_OFFLINE_PATTERN = r'BezvaData \| Soubor nenalezen' DOWNLOAD_FORM_PATTERN = r'
    ' diff --git a/module/plugins/hoster/EasybytezCom.py b/module/plugins/hoster/EasybytezCom.py index 4c1c885a7..0b46acb83 100644 --- a/module/plugins/hoster/EasybytezCom.py +++ b/module/plugins/hoster/EasybytezCom.py @@ -24,7 +24,7 @@ class EasybytezCom(SimpleHoster): __name__ = "EasybytezCom" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)?easybytez.com/(\w{6,}).*" - __version__ = "0.05" + __version__ = "0.06" __description__ = """easybytez.com""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -38,7 +38,7 @@ class EasybytezCom(SimpleHoster): FORM_INPUT_PATTERN = r']* name="([^"]+)"[^>]*value="([^"]*)"' WAIT_PATTERN = r'[^>]*>(\d+) seconds' - DIRECT_LINK_PATTERN = r'(http://\w+\.easybytez\.com/files/\d+/\w+/[^"<]+)' + DIRECT_LINK_PATTERN = r'(http://(\w+\.easybytez\.com|\d+\.\d+\.\d+\.\d+)/files/\d+/\w+/[^"<]+)' FORM_PATTERN = r']*action=["\']?([^"\' ]+)(.*?)' OVR_DOWNLOAD_LINK_PATTERN = r'

    Download Link

    \s*]*>([^<]+)' diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index a0bfe0ab2..1e1cc0b4b 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -37,7 +37,7 @@ class EuroshareEu(Hoster): __name__ = "EuroshareEu" __type__ = "hoster" __pattern__ = r"http://(\w*\.)?euroshare.eu/file/.*" - __version__ = "0.2b" + __version__ = "0.30" __description__ = """Euroshare.eu""" __author_name__ = ("zoidberg") diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py index 42ec0788b..d12fad738 100644 --- a/module/plugins/hoster/FilepostCom.py +++ b/module/plugins/hoster/FilepostCom.py @@ -18,7 +18,6 @@ import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -from module.network.RequestFactory import getURL from module.plugins.ReCaptcha import ReCaptcha from module.common.json_layer import json_loads from time import time @@ -26,16 +25,17 @@ from time import time class FilepostCom(SimpleHoster): __name__ = "FilepostCom" __type__ = "hoster" - __pattern__ = r"https?://(?:www\.)?filepost\.com/files/([^/]+).*" - __version__ = "0.23" + __pattern__ = r"https?://(?:www\.)?(?:filepost\.com/files|fp.io)/([^/]+).*" + __version__ = "0.25" __description__ = """Filepost.com plugin - free only""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") - FILE_INFO_PATTERN = r'

    (?P[^<]+)

    \s*
    \s*