From 82db99b5ce0e27464472ecbbaa60b8678c61e481 Mon Sep 17 00:00:00 2001 From: Piter Date: Wed, 23 Sep 2015 21:03:03 +0200 Subject: [Openload.io] Rewrite the plugin using official API --- module/plugins/hoster/OpenloadIo.py | 55 ++++++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 7 deletions(-) (limited to 'module/plugins/hoster/OpenloadIo.py') diff --git a/module/plugins/hoster/OpenloadIo.py b/module/plugins/hoster/OpenloadIo.py index 372ce28f9..f5d677bb2 100644 --- a/module/plugins/hoster/OpenloadIo.py +++ b/module/plugins/hoster/OpenloadIo.py @@ -1,31 +1,72 @@ # -*- coding: utf-8 -*- +import json +import re +from time import sleep from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.network.RequestFactory import getURL class OpenloadIo(SimpleHoster): __name__ = "OpenloadIo" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "testing" - __pattern__ = r'https?://(?:www\.)?openload\.(co|io)/f/[\w-]+' + _FILE_ID_PATTERN = '/f/([\w\-_]+)/?' + __pattern__ = r'https?://(?:www\.)?openload\.(?:co|io)' + _FILE_ID_PATTERN __description__ = """Openload.co hoster plugin""" __license__ = "GPLv3" __authors__ = [(None, None)] - NAME_PATTERN = r'(?P.+?)(?P[\d.,]+) (?P[\w^_]+)' - OFFLINE_PATTERN = r">(We can't find the file you are looking for)" - - LINK_FREE_PATTERN = r'id="real\w*download">