Add metadata and HTTP methods

master
Sven Slootweg 12 years ago
parent a8186e46ed
commit d6dd91cd85

@ -3,6 +3,10 @@ from resolv.shared import Task
class DummyTask(Task):
result_type = "dummy"
name = "Dummy Resolver"
author = "Sven Slootweg"
author_url = "http://cryto.net/~joepie91"
def run(self):
self.results = {'dummy': self.url}
self.state = "finished"

@ -4,6 +4,10 @@ from resolv.shared import ResolverError, Task
class FileboxTask(Task):
result_type = "video"
name = "Filebox.com"
author = "Sven Slootweg"
author_url = "http://cryto.net/~joepie91"
def run(self):
matches = re.search("https?:\/\/(www\.)?filebox\.com\/([a-zA-Z0-9]+)", self.url)
@ -29,6 +33,7 @@ class FileboxTask(Task):
stream_dict = {
'url' : video_file,
'method' : "GET",
'quality' : "unknown",
'priority' : 1,
'format' : "unknown"

@ -4,6 +4,10 @@ from resolv.shared import ResolverError, unescape, Task
class MediafireTask(Task):
result_type = "file"
name = "MediaFire"
author = "Sven Slootweg"
author_url = "http://cryto.net/~joepie91"
def run(self):
try:
contents = self.fetch_page(self.url)
@ -45,6 +49,7 @@ class MediafireTask(Task):
file_dict = {
'url' : file_url,
'method' : "GET",
'priority' : 1,
'format' : "unknown"
}

@ -4,6 +4,10 @@ from resolv.shared import ResolverError, Task
class OneChannelTask(Task):
result_type = "url"
name = "1channel"
author = "Sven Slootweg"
author_url = "http://cryto.net/~joepie91"
def run(self):
matches = re.search("https?:\/\/(www\.)?1channel\.ch\/external\.php\?.*url=([^&]+)", self.url)

@ -4,6 +4,10 @@ from resolv.shared import ResolverError, unescape, Task
class PastebinTask(Task):
result_type = "text"
name = "Pastebin"
author = "Sven Slootweg"
author_url = "http://cryto.net/~joepie91"
def run(self):
matches = re.search("https?:\/\/(www\.)?pastebin\.com\/([a-zA-Z0-9]+)", self.url)
@ -29,6 +33,7 @@ class PastebinTask(Task):
resolved = {
'url' : "http://pastebin.com/download.php?i=%s" % paste_id,
'method' : "GET",
'priority' : 1,
'format' : "text"
}

@ -4,6 +4,10 @@ from resolv.shared import ResolverError, unescape, Task
class PutlockerTask(Task):
result_type = "video"
name = "PutLocker"
author = "Sven Slootweg"
author_url = "http://cryto.net/~joepie91"
def run(self):
try:
import mechanize
@ -64,6 +68,7 @@ class PutlockerTask(Task):
stream_dict = {
'url' : video_file,
'method' : "GET",
'quality' : "unknown",
'priority' : 1,
'format' : "unknown"

@ -4,6 +4,10 @@ from resolv.shared import ResolverError, unescape, Task
class SockshareTask(Task):
result_type = "video"
name = "SockShare"
author = "Sven Slootweg"
author_url = "http://cryto.net/~joepie91"
def run(self):
try:
import mechanize
@ -64,6 +68,7 @@ class SockshareTask(Task):
stream_dict = {
'url' : video_file,
'method' : "GET",
'quality' : "unknown",
'priority' : 1,
'format' : "unknown"

@ -4,6 +4,10 @@ from resolv.shared import ResolverError, unescape, Task
class YoutubeTask(Task):
result_type = "video"
name = "YouTube"
author = "Sven Slootweg"
author_url = "http://cryto.net/~joepie91"
extra_headers = {
'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',

Loading…
Cancel
Save