# -*- coding: utf-8 -*- import re from time import time from module.common.json_layer import json_loads from module.plugins.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")] 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 [\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)