summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/UploadedTo.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-08-25 16:39:54 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2010-08-25 16:39:54 +0200
commit9e1a4572a58a52d75c52de5fe04045981fcea88e (patch)
tree46eba3f59ebe0e2c5051d58876eadaf94387fa66 /module/plugins/hoster/UploadedTo.py
parentmore cleanup (diff)
downloadpyload-9e1a4572a58a52d75c52de5fe04045981fcea88e.tar.xz
ul.to fetching, so.biz expire
Diffstat (limited to 'module/plugins/hoster/UploadedTo.py')
-rw-r--r--module/plugins/hoster/UploadedTo.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index 2226f2943..b6bd872f1 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -3,8 +3,20 @@
import re
from time import time
from module.plugins.Hoster import Hoster
+from module.network.Request import getURL
import hashlib
+def getInfo(urls):
+ for url in urls:
+ match = re.compile(UploadedTo.__pattern__).search(url)
+ if match:
+ src = getURL("http://uploaded.to/api/file", get={"id": match.group(1).split("/")[0]})
+ if src.find("404 Not Found") >= 0:
+ result.append((url, 0, 1, url))
+ continue
+ lines = src.splitlines()
+ result.append((lines[0], int(lines[1]), 2, url))
+
class UploadedTo(Hoster):
__name__ = "UploadedTo"
__type__ = "hoster"