From acc46fc3497a66a427b795b4a22c6e71d69185a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 13 Dec 2014 15:56:57 +0100 Subject: Update --- pyload/plugin/hoster/BayfilesCom.py | 87 +++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 pyload/plugin/hoster/BayfilesCom.py (limited to 'pyload/plugin/hoster/BayfilesCom.py') diff --git a/pyload/plugin/hoster/BayfilesCom.py b/pyload/plugin/hoster/BayfilesCom.py new file mode 100644 index 000000000..3a139a796 --- /dev/null +++ b/pyload/plugin/hoster/BayfilesCom.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- + +import re + +from time import time + +from pyload.utils import json_loads +from pyload.plugin.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class BayfilesCom(SimpleHoster): + __name = "BayfilesCom" + __type = "hoster" + __version = "0.08" + + __pattern = r'https?://(?:www\.)?bayfiles\.(com|net)/file/(?P\w+/\w+/[^/]+)' + + __description = """Bayfiles.com hoster plugin""" + __license = "GPLv3" + __authors = [("zoidberg", "zoidberg@mujmail.cz"), + ("Walter Purcaro", "vuolter@gmail.com")] + + + 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 [\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'(?: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