From f76e5c2336718dca9da8033ba22cd83c72c7b3b3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 11 Oct 2014 15:14:28 +0200 Subject: Pattern update 1 --- module/plugins/hoster/BayfilesCom.py | 6 +++--- module/plugins/hoster/BitshareCom.py | 2 +- module/plugins/hoster/CzshareCom.py | 4 ++-- module/plugins/hoster/DepositfilesCom.py | 2 +- module/plugins/hoster/DlFreeFr.py | 4 ++-- module/plugins/hoster/EdiskCz.py | 2 +- module/plugins/hoster/ExtabitCom.py | 2 +- module/plugins/hoster/FastixRu.py | 2 +- module/plugins/hoster/FileParadoxIn.py | 1 - module/plugins/hoster/FileStoreTo.py | 2 +- module/plugins/hoster/FilefactoryCom.py | 2 +- module/plugins/hoster/FileomCom.py | 2 +- module/plugins/hoster/FilepostCom.py | 2 +- module/plugins/hoster/FourSharedCom.py | 2 +- module/plugins/hoster/FreakshareCom.py | 4 ++-- module/plugins/hoster/FshareVn.py | 2 +- module/plugins/hoster/GamefrontCom.py | 6 +++--- module/plugins/hoster/HellshareCz.py | 2 +- module/plugins/hoster/HundredEightyUploadCom.py | 2 +- module/plugins/hoster/IfileIt.py | 2 +- module/plugins/hoster/JumbofilesCom.py | 2 +- module/plugins/hoster/MegaNz.py | 2 +- module/plugins/hoster/MegaRapidCz.py | 2 +- module/plugins/hoster/MegacrypterCom.py | 2 +- module/plugins/hoster/MegasharesCom.py | 2 +- module/plugins/hoster/NarodRu.py | 4 ++-- module/plugins/hoster/NosuploadCom.py | 2 +- module/plugins/hoster/NowDownloadEu.py | 8 ++++---- module/plugins/hoster/PornhostCom.py | 8 ++++---- module/plugins/hoster/PornhubCom.py | 2 +- module/plugins/hoster/QuickshareCz.py | 4 ++-- module/plugins/hoster/RapidgatorNet.py | 2 +- module/plugins/hoster/RapidshareCom.py | 2 +- module/plugins/hoster/RyushareCom.py | 2 +- module/plugins/hoster/SendspaceCom.py | 2 +- module/plugins/hoster/ShareplaceCom.py | 2 +- module/plugins/hoster/SoundcloudCom.py | 2 +- module/plugins/hoster/TurbobitNet.py | 2 +- module/plugins/hoster/TwoSharedCom.py | 2 +- module/plugins/hoster/UlozTo.py | 4 ++-- module/plugins/hoster/UloziskoSk.py | 2 +- module/plugins/hoster/UnibytesCom.py | 2 +- module/plugins/hoster/UploadStationCom.py | 2 +- module/plugins/hoster/UploadheroCom.py | 4 ++-- module/plugins/hoster/UploadingCom.py | 2 +- module/plugins/hoster/VeehdCom.py | 4 ++-- module/plugins/hoster/VidPlayNet.py | 1 - module/plugins/hoster/WrzucTo.py | 2 +- module/plugins/hoster/WuploadCom.py | 2 +- module/plugins/hoster/XVideosCom.py | 2 +- module/plugins/hoster/YourfilesTo.py | 2 +- module/plugins/hoster/ZDF.py | 4 ++-- 52 files changed, 69 insertions(+), 71 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/BayfilesCom.py b/module/plugins/hoster/BayfilesCom.py index 3d4306df5..98c5d27ba 100644 --- a/module/plugins/hoster/BayfilesCom.py +++ b/module/plugins/hoster/BayfilesCom.py @@ -13,7 +13,7 @@ class BayfilesCom(SimpleHoster): __type__ = "hoster" __version__ = "0.07" - __pattern__ = r'https?://(?:www\.)?bayfiles\.(com|net)/file/(?P[a-zA-Z0-9]+/[a-zA-Z0-9]+/[^/]+)' + __pattern__ = r'https?://(?:www\.)?bayfiles\.(com|net)/file/(?P\w+/\w+/[^/]+)' __description__ = """Bayfiles.com hoster plugin""" __license__ = "GPLv3" @@ -21,10 +21,10 @@ class BayfilesCom(SimpleHoster): ("Walter Purcaro", "vuolter@gmail.com")] - FILE_INFO_PATTERN = r'

[^<]*(?P[0-9., ]+)(?P[kKMG])i?B

' + FILE_INFO_PATTERN = r'

[^<]*(?P[\d .,]+)(?P\w+)

' OFFLINE_PATTERN = r'(

The requested file could not be found.

|404 Not Found)' - WAIT_PATTERN = r'>Your IP [0-9.]* has recently downloaded a file\. Upgrade to premium or wait (\d+) minutes\.<' + WAIT_PATTERN = r'>Your IP [\d.]* has recently downloaded a file\. Upgrade to premium or wait (\d+) minutes\.<' VARS_PATTERN = r'var vfid = (\d+);\s*var delay = (\d+);' FREE_LINK_PATTERN = r"javascript:window.location.href = '([^']+)';" PREMIUM_LINK_PATTERN = r'(?:[a-zA-Z0-9]+)(/(?P.*?)\.html)?|\?f=(?P[a-zA-Z0-9]+))' + __pattern__ = r'http://(?:www\.)?bitshare\.com/(files/(?P\w+)(/(?P.*?)\.html)?|\?f=(?P\w+))' __description__ = """Bitshare.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py index 9e965b972..0ec60b5d1 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -22,7 +22,7 @@ class CzshareCom(SimpleHoster): FILE_NAME_PATTERN = r'
\s*

\s*Cel. n.zev: ]*>(?P[^<]+)' - FILE_SIZE_PATTERN = r'

(?:\s*

[^\n]*

)*\s*Velikost:\s*(?P[0-9., ]+)(?P[kKMG])i?B\s*
' + FILE_SIZE_PATTERN = r'
(?:\s*

[^\n]*

)*\s*Velikost:\s*(?P[\d .,]+)(?P\w+)\s*
' OFFLINE_PATTERN = r'
\s*

' FILE_SIZE_REPLACEMENTS = [(' ', '')] @@ -35,7 +35,7 @@ class CzshareCom(SimpleHoster): PREMIUM_FORM_PATTERN = r'
(.*?)
' FORM_INPUT_PATTERN = r']* name="([^"]+)" value="([^"]+)"[^>]*/>' MULTIDL_PATTERN = r"

Z[^<]*PROFI.

" - USER_CREDIT_PATTERN = r'
\s*kredit: ([0-9., ]+)([kKMG]i?B)\s*
' + USER_CREDIT_PATTERN = r'
\s*kredit: ([\d .,]+)(\w+)\s*
' def checkTrafficLeft(self): diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py index 54ceabb6c..67b00342e 100644 --- a/module/plugins/hoster/DepositfilesCom.py +++ b/module/plugins/hoster/DepositfilesCom.py @@ -23,7 +23,7 @@ class DepositfilesCom(SimpleHoster): FILE_NAME_PATTERN = r'' @@ -29,7 +29,7 @@ class QuickshareCz(SimpleHoster): self.getFileInfo() # parse js variables - self.jsvars = dict((x, y.strip("'")) for x, y in re.findall(r"var (\w+) = ([0-9.]+|'[^']*')", self.html)) + self.jsvars = dict((x, y.strip("'")) for x, y in re.findall(r"var (\w+) = ([\d.]+|'[^']*')", self.html)) self.logDebug(self.jsvars) pyfile.name = self.jsvars['ID3'] diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py index 0223af3c1..f1d59efea 100644 --- a/module/plugins/hoster/RapidgatorNet.py +++ b/module/plugins/hoster/RapidgatorNet.py @@ -29,7 +29,7 @@ class RapidgatorNet(SimpleHoster): API_URL = "http://rapidgator.net/api/file" FILE_NAME_PATTERN = r'Download file (?P<N>.*)' - FILE_SIZE_PATTERN = r'File size:\s*(?P[\d\.]+) (?P\w+)' + FILE_SIZE_PATTERN = r'File size:\s*(?P[\d.]+) (?P\w+)' OFFLINE_PATTERN = r'>(File not found|Error 404)' JSVARS_PATTERN = r"\s+var\s*(startTimerUrl|getDownloadUrl|captchaUrl|fid|secs)\s*=\s*'?(.*?)'?;" diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py index 22887e7cc..88154b5e9 100644 --- a/module/plugins/hoster/RapidshareCom.py +++ b/module/plugins/hoster/RapidshareCom.py @@ -46,7 +46,7 @@ class RapidshareCom(Hoster): __type__ = "hoster" __version__ = "1.39" - __pattern__ = r'https?://(?:www\.)?rapidshare.com/(?:files/(?P\d*?)/(?P[^?]+)|#!download\|(?:\w+)\|(?P\d+)\|(?P[^|]+))' + __pattern__ = r'https?://(?:www\.)?rapidshare.com/(?:files/(?P\d+)/(?P[^?]+)|#!download\|(?:\w+)\|(?P\d+)\|(?P[^|]+))' __config__ = [("server", "Cogent;Deutsche Telekom;Level(3);Level(3) #2;GlobalCrossing;Level(3) #3;Teleglobe;GlobalCrossing #2;TeliaSonera #2;Teleglobe #2;TeliaSonera #3;TeliaSonera", "Preferred Server", "None")] diff --git a/module/plugins/hoster/RyushareCom.py b/module/plugins/hoster/RyushareCom.py index 833577c1a..4a5811581 100644 --- a/module/plugins/hoster/RyushareCom.py +++ b/module/plugins/hoster/RyushareCom.py @@ -25,7 +25,7 @@ class RyushareCom(XFSPHoster): HOSTER_NAME = "ryushare.com" - FILE_SIZE_PATTERN = r'You have requested [^<]+ \((?P[\d\.]+) (?P\w+)' + FILE_SIZE_PATTERN = r'You have requested [^<]+ \((?P[\d.]+) (?P\w+)' WAIT_PATTERN = r'You have to wait ((?P\d+) hour[s]?, )?((?P\d+) minute[s], )?(?P\d+) second[s]' LINK_PATTERN = r'Click here to download<' diff --git a/module/plugins/hoster/SendspaceCom.py b/module/plugins/hoster/SendspaceCom.py index b9907794d..834eff1a9 100644 --- a/module/plugins/hoster/SendspaceCom.py +++ b/module/plugins/hoster/SendspaceCom.py @@ -18,7 +18,7 @@ class SendspaceCom(SimpleHoster): FILE_NAME_PATTERN = r'

\s*<(?:b|strong)>(?P[^<]+)\s*File Size:\s*(?P[0-9.]+)(?P[kKMG])i?B\s*

' + FILE_SIZE_PATTERN = r'
\s*File Size:\s*(?P[\d.]+)(?P\w+)\s*
' OFFLINE_PATTERN = r'
Sorry, the file you requested is not available.
' LINK_PATTERN = r'
(?P.+?)<' - FILE_SIZE_PATTERN = r'class="file-size">(?P[\d,.]+) (?P\w+)' + FILE_SIZE_PATTERN = r'class="file-size">(?P[\d.,]+) (?P\w+)' OFFLINE_PATTERN = r'

File Not Found

|html\(\'File (?:was )?not found' FILE_URL_REPLACEMENTS = [(__pattern__, "http://turbobit.net/\g.html")] diff --git a/module/plugins/hoster/TwoSharedCom.py b/module/plugins/hoster/TwoSharedCom.py index 4bef13a67..44c927f4b 100644 --- a/module/plugins/hoster/TwoSharedCom.py +++ b/module/plugins/hoster/TwoSharedCom.py @@ -18,7 +18,7 @@ class TwoSharedCom(SimpleHoster): FILE_NAME_PATTERN = r'

(?P.*)

' - FILE_SIZE_PATTERN = r'File size:\s*(?P[0-9,.]+) (?P[kKMG])i?B' + FILE_SIZE_PATTERN = r'File size:\s*(?P[\d.,]+) (?P\w+)' OFFLINE_PATTERN = r'The file link that you requested is not valid\.|This file was deleted\.' LINK_PATTERN = r"window.location ='([^']+)';" diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index cf92560bc..9b6842ae7 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -26,10 +26,10 @@ class UlozTo(SimpleHoster): FILE_INFO_PATTERN = r'

File (?P[^<]+) is password protected

' FILE_NAME_PATTERN = r'(?P<N>[^<]+) \| Uloz.to' - FILE_SIZE_PATTERN = r'.*?(?P[0-9.]+\s[kMG]?B)' + FILE_SIZE_PATTERN = r'.*?(?P[\d.]+\s[kMG]?B)' OFFLINE_PATTERN = r'404 - Page not found|

File (has been deleted|was banned)

' - FILE_SIZE_REPLACEMENTS = [('([0-9.]+)\s([kMG])B', convertDecimalPrefix)] + FILE_SIZE_REPLACEMENTS = [('([\d.]+)\s([kMG])B', convertDecimalPrefix)] FILE_URL_REPLACEMENTS = [(r"(?<=http://)([^/]+)", "www.ulozto.net")] ADULT_PATTERN = r'
' diff --git a/module/plugins/hoster/UloziskoSk.py b/module/plugins/hoster/UloziskoSk.py index 1ce7c8879..536830bd9 100644 --- a/module/plugins/hoster/UloziskoSk.py +++ b/module/plugins/hoster/UloziskoSk.py @@ -18,7 +18,7 @@ class UloziskoSk(SimpleHoster): FILE_NAME_PATTERN = r'
(?P[^<]+)
' - FILE_SIZE_PATTERN = ur'Veľkosť súboru: (?P[0-9.]+) (?P[kKMG])i?B
' + FILE_SIZE_PATTERN = ur'Veľkosť súboru: (?P[\d.]+) (?P\w+)
' OFFLINE_PATTERN = ur'Zadaný súbor neexistuje z jedného z nasledujúcich dôvodov:' LINK_PATTERN = r'' diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py index ec6df395c..8e732d1fd 100644 --- a/module/plugins/hoster/UnibytesCom.py +++ b/module/plugins/hoster/UnibytesCom.py @@ -12,7 +12,7 @@ class UnibytesCom(SimpleHoster): __type__ = "hoster" __version__ = "0.1" - __pattern__ = r'http://(?:www\.)?unibytes\.com/[a-zA-Z0-9-._ ]{11}B' + __pattern__ = r'http://(?:www\.)?unibytes\.com/[\w .-]{11}B' __description__ = """UniBytes.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/UploadStationCom.py b/module/plugins/hoster/UploadStationCom.py index 7b3f4d55e..c8b0ca361 100644 --- a/module/plugins/hoster/UploadStationCom.py +++ b/module/plugins/hoster/UploadStationCom.py @@ -8,7 +8,7 @@ class UploadStationCom(DeadHoster): __type__ = "hoster" __version__ = "0.52" - __pattern__ = r'http://(?:www\.)?uploadstation\.com/file/(?P[A-Za-z0-9]+)' + __pattern__ = r'http://(?:www\.)?uploadstation\.com/file/(?P\w+)' __description__ = """UploadStation.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/UploadheroCom.py b/module/plugins/hoster/UploadheroCom.py index d22280102..ced5762ba 100644 --- a/module/plugins/hoster/UploadheroCom.py +++ b/module/plugins/hoster/UploadheroCom.py @@ -30,8 +30,8 @@ class UploadheroCom(SimpleHoster): IP_BLOCKED_PATTERN = r'href="(/lightbox_block_download.php\?min=.*?)"' IP_WAIT_PATTERN = r'(\d+).*\s*(\d+)' - CAPTCHA_PATTERN = r'"(/captchadl\.php\?[a-z0-9]+)"' - FREE_URL_PATTERN = r'var magicomfg = \'
"/]+)"' + CAPTCHA_PATTERN = r'"(/captchadl\.php\?\w+)"' + FREE_URL_PATTERN = r'var magicomfg = \'"/]+)"' PREMIUM_URL_PATTERN = r'[\w\d]+)' + __pattern__ = r'http://(?:www\.)?uploading\.com/files/(?:get/)?(?P\w+)' __description__ = """Uploading.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/VeehdCom.py b/module/plugins/hoster/VeehdCom.py index 50d24f4c9..f82d429d1 100644 --- a/module/plugins/hoster/VeehdCom.py +++ b/module/plugins/hoster/VeehdCom.py @@ -59,9 +59,9 @@ class VeehdCom(Hoster): # replace unwanted characters in filename if self.getConfig('filename_spaces'): - pattern = '[^0-9A-Za-z\.\ ]+' + pattern = '[^\w ]+' else: - pattern = '[^0-9A-Za-z\.]+' + pattern = '[^\w.]+' return re.sub(pattern, self.getConfig('replacement_char'), name) + '.avi' diff --git a/module/plugins/hoster/VidPlayNet.py b/module/plugins/hoster/VidPlayNet.py index 95ed386d7..6ac43ef6e 100644 --- a/module/plugins/hoster/VidPlayNet.py +++ b/module/plugins/hoster/VidPlayNet.py @@ -21,7 +21,6 @@ class VidPlayNet(XFSPHoster): HOSTER_NAME = "vidplay.net" FILE_NAME_PATTERN = r'Password:
\s*(?P[^<]+)' - LINK_PATTERN = r'(http://([^/]*?%s|\d+\.\d+\.\d+\.\d+)(:\d+)?(/d/|(?:/files)?/\d+/\w+/)[^"\'<&]+)' % HOSTER_NAME getInfo = create_getInfo(VidPlayNet) diff --git a/module/plugins/hoster/WrzucTo.py b/module/plugins/hoster/WrzucTo.py index 0a5d9bfb4..0076635e2 100644 --- a/module/plugins/hoster/WrzucTo.py +++ b/module/plugins/hoster/WrzucTo.py @@ -12,7 +12,7 @@ class WrzucTo(SimpleHoster): __type__ = "hoster" __version__ = "0.01" - __pattern__ = r'http://(?:www\.)?wrzuc\.to/([a-zA-Z0-9]+(\.wt|\.html)|(\w+/?linki/[a-zA-Z0-9]+))' + __pattern__ = r'http://(?:www\.)?wrzuc\.to/(\w+(\.wt|\.html)|(\w+/?linki/\w+))' __description__ = """Wrzuc.to hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/WuploadCom.py b/module/plugins/hoster/WuploadCom.py index 5b4e2318f..ba1356a29 100644 --- a/module/plugins/hoster/WuploadCom.py +++ b/module/plugins/hoster/WuploadCom.py @@ -8,7 +8,7 @@ class WuploadCom(DeadHoster): __type__ = "hoster" __version__ = "0.23" - __pattern__ = r'http://(?:www\.)?wupload\..*?/file/(([a-z][0-9]+/)?[0-9]+)(/.*)?' + __pattern__ = r'http://(?:www\.)?wupload\..*?/file/((\w+/)?\d+)(/.*)?' __description__ = """Wupload.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/XVideosCom.py b/module/plugins/hoster/XVideosCom.py index 6192782c8..a631a4dc3 100644 --- a/module/plugins/hoster/XVideosCom.py +++ b/module/plugins/hoster/XVideosCom.py @@ -12,7 +12,7 @@ class XVideosCom(Hoster): __type__ = "hoster" __version__ = "0.1" - __pattern__ = r'http://(?:www\.)?xvideos\.com/video([0-9]+)/.*' + __pattern__ = r'http://(?:www\.)?xvideos\.com/video(\d+)/.*' __description__ = """XVideos.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py index efbb927f0..4487a728a 100644 --- a/module/plugins/hoster/YourfilesTo.py +++ b/module/plugins/hoster/YourfilesTo.py @@ -12,7 +12,7 @@ class YourfilesTo(Hoster): __type__ = "hoster" __version__ = "0.21" - __pattern__ = r'(http://)?(?:www\.)?yourfiles\.(to|biz)/\?d=[a-zA-Z0-9]+' + __pattern__ = r'(http://)?(?:www\.)?yourfiles\.(to|biz)/\?d=\w+' __description__ = """Youfiles.to hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/ZDF.py b/module/plugins/hoster/ZDF.py index a59812271..83a3bd95c 100644 --- a/module/plugins/hoster/ZDF.py +++ b/module/plugins/hoster/ZDF.py @@ -13,7 +13,7 @@ class ZDF(Hoster): __type__ = "hoster" __version__ = "0.8" - __pattern__ = r'http://(?:www\.)?zdf\.de/ZDFmediathek/[^0-9]*([0-9]+)[^0-9]*' + __pattern__ = r'http://(?:www\.)?zdf\.de/ZDFmediathek/\D*(\d+)\D*' __description__ = """ZDF.de hoster plugin""" __license__ = "GPLv3" @@ -36,7 +36,7 @@ class ZDF(Hoster): @staticmethod def get_id(url): - return int(re.search(r"[^0-9]*([0-9]{4,})[^0-9]*", url).group(1)) + return int(re.search(r"\D*(\d{4,})\D*", url).group(1)) def process(self, pyfile): xml = fromstring(self.load(self.XML_API % self.get_id(pyfile.url))) -- cgit v1.2.3