forked from pyload/pyload
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJumbofilesCom.py
More file actions
31 lines (24 loc) · 1.16 KB
/
Copy pathJumbofilesCom.py
File metadata and controls
31 lines (24 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# -*- coding: utf-8 -*-
import re
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class JumbofilesCom(SimpleHoster):
__name__ = "JumbofilesCom"
__type__ = "hoster"
__pattern__ = r"http://(?:\w*\.)*jumbofiles.com/(\w{12}).*"
__version__ = "0.02"
__description__ = """JumboFiles.com hoster plugin"""
__author_name__ = ("godofdream")
__author_mail__ = ("soilfiction@gmail.com")
FILE_INFO_PATTERN = '<TR><TD>(?P<N>[^<]+?)\s*<small>\((?P<S>[\d.]+)\s*(?P<U>[KMG][bB])\)</small></TD></TR>'
FILE_OFFLINE_PATTERN = 'Not Found or Deleted / Disabled due to inactivity or DMCA'
DIRECT_LINK_PATTERN = '<meta http-equiv="refresh" content="10;url=(.+)">'
def setup(self):
self.resumeDownload = self.multiDL = True
def handleFree(self):
ukey = re.search(self.__pattern__, self.pyfile.url).group(1)
post_data = {"id": ukey, "op": "download3", "rand": ""}
html = self.load(self.pyfile.url, post=post_data, decode=True)
url = re.search(self.DIRECT_LINK_PATTERN, html).group(1)
self.logDebug("Download " + url)
self.download(url)
getInfo = create_getInfo(JumbofilesCom)