diff options
Diffstat (limited to 'module/plugins/internal/SimpleHoster.py')
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index a05b6e98c..e0963fd91 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -19,8 +19,10 @@ from module.plugins.Hoster import Hoster from module.utils import html_unescape +from module.network.RequestFactory import getURL from re import search + def parseFileInfo(self, url = '', html = ''): if not html and hasattr(self, "html"): html = self.html name, size, status, found = '', 0, 3, 0 @@ -52,7 +54,15 @@ def parseFileInfo(self, url = '', html = ''): if not name: name = url - return (name, size, status, url) + return name, size, status, url + + +def create_getInfo(plugin): + def getInfo(urls): + for url in urls: + file_info = parseFileInfo(plugin, url, getURL(url, decode=True)) + yield file_info + return getInfo class PluginParseError(Exception): def __init__(self, msg): |