From d898872107f8a6a7a4d8b8610ef367a7b07d6a88 Mon Sep 17 00:00:00 2001 From: Stefano Date: Sun, 23 Jun 2013 20:19:26 +0200 Subject: UnrestrictLi: added ability to delete the download history --- module/plugins/hoster/UnrestrictLi.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py index 1652dc606..e866a9269 100644 --- a/module/plugins/hoster/UnrestrictLi.py +++ b/module/plugins/hoster/UnrestrictLi.py @@ -35,7 +35,7 @@ def secondsToMidnight(): class UnrestrictLi(Hoster): __name__ = "UnrestrictLi" - __version__ = "0.02" + __version__ = "0.03" __type__ = "hoster" __pattern__ = r"https?://.*(unrestrict|unr)\.li" __description__ = """Unrestrict.li hoster plugin""" @@ -56,7 +56,8 @@ class UnrestrictLi(Hoster): new_url = pyfile.url else: for i in xrange(5): - page = self.req.load('https://unrestrict.li/unrestrict.php', post={'link': pyfile.url, 'domain': 'long'}) + page = self.req.load('https://unrestrict.li/unrestrict.php', + post={'link': pyfile.url, 'domain': 'long'}) self.logDebug("JSON data: " + page) if page != '': break @@ -72,3 +73,7 @@ class UnrestrictLi(Hoster): self.logDebug("New URL: " + new_url) self.download(new_url, disposition=True) + + if self.getConfig("history"): + self.load("https://unrestrict.li/history/&delete=all") + self.logInfo("Download history deleted") -- cgit v1.2.3