# -*- 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.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)