From 68d662e689cd42687341c550fb6ebb74e6968d21 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Sep 2014 00:29:57 +0200 Subject: module -> pyload --- pyload/plugins/hoster/BayfilesCom.py | 84 ++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 pyload/plugins/hoster/BayfilesCom.py (limited to 'pyload/plugins/hoster/BayfilesCom.py') diff --git a/pyload/plugins/hoster/BayfilesCom.py b/pyload/plugins/hoster/BayfilesCom.py new file mode 100644 index 000000000..ea4bd3ca5 --- /dev/null +++ b/pyload/plugins/hoster/BayfilesCom.py @@ -0,0 +1,84 @@ +# -*- coding: utf-8 -*- + +import re + +from time import time + +from pyload.common.json_layer import json_loads +from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class BayfilesCom(SimpleHoster): + __name__ = "BayfilesCom" + __type__ = "hoster" + __version__ = "0.07" + + __pattern__ = r'https?://(?:www\.)?bayfiles\.(com|net)/file/(?P[a-zA-Z0-9]+/[a-zA-Z0-9]+/[^/]+)' + + __description__ = """Bayfiles.com hoster plugin""" + __author_name__ = ("zoidberg", "Walter Purcaro") + __author_mail__ = ("zoidberg@mujmail.cz", "vuolter@gmail.com") + + FILE_INFO_PATTERN = r'

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

' + 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\.<' + VARS_PATTERN = r'var vfid = (\d+);\s*var delay = (\d+);' + FREE_LINK_PATTERN = r"javascript:window.location.href = '([^']+)';" + PREMIUM_LINK_PATTERN = r'(?:BayFiles"), + "notfound": re.compile(r"404 Not Found") + }) + if check == "waitforfreeslots": + self.retry(30, 5 * 60, "Wait for free slot") + elif check == "notfound": + self.retry(30, 5 * 60, "404 Not found") + + +getInfo = create_getInfo(BayfilesCom) -- cgit v1.2.3