summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/OverLoadMe.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-07 23:40:50 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-14 10:58:42 +0200
commit887ad58e4c6c20b992311bbdf931bcd18e73d384 (patch)
treef31beb241bacca0bfea4c1acc4e9ace813755cef /module/plugins/hoster/OverLoadMe.py
parent[AccountManager] Fixed #733 (diff)
parent[File4safe] distributing LINK_PATTERN (diff)
downloadpyload-887ad58e4c6c20b992311bbdf931bcd18e73d384.tar.xz
Merge branch 'stable' into 0.4.10
Conflicts: module/plugins/Account.py module/plugins/AccountManager.py module/plugins/Hook.py module/plugins/OCR.py module/plugins/Plugin.py module/plugins/PluginManager.py module/plugins/ReCaptcha.py module/plugins/accounts/Ftp.py module/plugins/accounts/Http.py module/plugins/internal/MultiHoster.py module/plugins/ocr/GigasizeCom.py module/plugins/ocr/LinksaveIn.py module/plugins/ocr/NetloadIn.py module/plugins/ocr/ShareonlineBiz.py
Diffstat (limited to 'module/plugins/hoster/OverLoadMe.py')
-rw-r--r--module/plugins/hoster/OverLoadMe.py24
1 files changed, 14 insertions, 10 deletions
diff --git a/module/plugins/hoster/OverLoadMe.py b/module/plugins/hoster/OverLoadMe.py
index aaa1442e4..7b7c83893 100644
--- a/module/plugins/hoster/OverLoadMe.py
+++ b/module/plugins/hoster/OverLoadMe.py
@@ -1,23 +1,27 @@
# -*- coding: utf-8 -*-
import re
-from urllib import unquote
+
from random import randrange
+from urllib import unquote
-from module.plugins.Hoster import Hoster
from module.common.json_layer import json_loads
+from module.plugins.Hoster import Hoster
from module.utils import parseFileSize
class OverLoadMe(Hoster):
__name__ = "OverLoadMe"
- __version__ = "0.01"
__type__ = "hoster"
+ __version__ = "0.01"
+
__pattern__ = r'https?://.*overload\.me.*'
+
__description__ = """Over-Load.me hoster plugin"""
__author_name__ = "marley"
__author_mail__ = "marley@over-load.me"
+
def getFilename(self, url):
try:
name = unquote(url.rsplit("/", 1)[1])
@@ -42,19 +46,19 @@ class OverLoadMe(Hoster):
data = self.account.getAccountData(self.user)
page = self.load("https://api.over-load.me/getdownload.php",
- get={"auth": data["password"], "link": pyfile.url})
+ get={"auth": data['password'], "link": pyfile.url})
data = json_loads(page)
self.logDebug("Returned Data: %s" % data)
- if data["err"] == 1:
- self.logWarning(data["msg"])
+ if data['err'] == 1:
+ self.logWarning(data['msg'])
self.tempOffline()
else:
- if pyfile.name is not None and pyfile.name.endswith('.tmp') and data["filename"]:
- pyfile.name = data["filename"]
- pyfile.size = parseFileSize(data["filesize"])
- new_url = data["downloadlink"]
+ if pyfile.name is not None and pyfile.name.endswith('.tmp') and data['filename']:
+ pyfile.name = data['filename']
+ pyfile.size = parseFileSize(data['filesize'])
+ new_url = data['downloadlink']
if self.getConfig("https"):
new_url = new_url.replace("http://", "https://")