@@ -0,0 +1,21 @@
|
||||
from .main import Moovee
|
||||
|
||||
def start():
|
||||
return Moovee()
|
||||
|
||||
config = [{
|
||||
'name': 'moovee',
|
||||
'groups': [
|
||||
{
|
||||
'tab': 'providers',
|
||||
'name': '#alt.binaries.moovee',
|
||||
'description': 'SD movies only',
|
||||
'options': [
|
||||
{
|
||||
'name': 'enabled',
|
||||
'type': 'enabler',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}]
|
||||
@@ -0,0 +1,71 @@
|
||||
from couchpotato.core.event import fireEvent
|
||||
from couchpotato.core.helpers.rss import RSS
|
||||
from couchpotato.core.logger import CPLog
|
||||
from couchpotato.core.providers.nzb.base import NZBProvider
|
||||
from dateutil.parser import parse
|
||||
from urllib import quote_plus
|
||||
import re
|
||||
import time
|
||||
|
||||
log = CPLog(__name__)
|
||||
|
||||
|
||||
class Moovee(NZBProvider, RSS):
|
||||
|
||||
urls = {
|
||||
'download': 'http://85.214.105.230/get_nzb.php?id=%s§ion=moovee',
|
||||
'search': 'http://abmoovee.allfilled.com/search.php?q=%s&Search=Search',
|
||||
'regex': '<td class="cell_reqid">(?P<reqid>.*?)</td>.+?<td class="cell_request">(?P<title>.*?)</td>.+?<td class="cell_statuschange">(?P<age>.*?)</td>',
|
||||
}
|
||||
|
||||
def search(self, movie, quality):
|
||||
|
||||
results = []
|
||||
if self.isDisabled() or not self.isAvailable(self.urls['search']):
|
||||
return results
|
||||
|
||||
url = self.urls['search'] % quote_plus(movie['library']['titles'][0]['title'] + ' ' + quality.get('identifier'))
|
||||
log.info('Searching: %s' % url)
|
||||
|
||||
data = self.urlopen(url)
|
||||
match = re.compile(self.urls['regex'], re.DOTALL).finditer(data)
|
||||
|
||||
for nzb in match:
|
||||
new = {
|
||||
'id': nzb.group('reqid'),
|
||||
'name': nzb.group('title'),
|
||||
'type': 'nzb',
|
||||
'provider': self.getName(),
|
||||
'age': self.calculateAge(time.mktime(parse(nzb.group('age')).timetuple())),
|
||||
'size': None,
|
||||
'url': self.urls['download'] % (nzb.group('reqid')),
|
||||
'download': self.download,
|
||||
'detail_url': '',
|
||||
'description': '',
|
||||
'check_nzb': False,
|
||||
}
|
||||
|
||||
new['score'] = fireEvent('score.calculate', new, movie, single = True)
|
||||
is_correct_movie = fireEvent('searcher.correct_movie',
|
||||
nzb = new, movie = movie, quality = quality,
|
||||
imdb_results = False, single_category = False, single = True)
|
||||
if is_correct_movie:
|
||||
results.append(new)
|
||||
self.found(new)
|
||||
|
||||
return results
|
||||
|
||||
def download(self, url = '', nzb_id = ''):
|
||||
try:
|
||||
log.info('Downloading nzb from #alt.binaries.moovee, request id: %s ' % nzb_id)
|
||||
return self.urlopen(self.urls['download'] % nzb_id)
|
||||
|
||||
except Exception, e:
|
||||
log.error('Failed downloading from #alt.binaries.moovee: %s' % e)
|
||||
return False
|
||||
|
||||
def belongsTo(self, url, host = None):
|
||||
match = re.match('http://85\.214\.105\.230/get_nzb\.php\?id=[0-9]*§ion=moovee', url)
|
||||
if match:
|
||||
return self
|
||||
return
|
||||
@@ -9,6 +9,7 @@ config = [{
|
||||
{
|
||||
'tab': 'providers',
|
||||
'name': '#alt.binaries.hdtv.x264',
|
||||
'description': 'HD movies only',
|
||||
'options': [
|
||||
{
|
||||
'name': 'enabled',
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
from couchpotato.core.event import fireEvent
|
||||
from couchpotato.core.helpers.rss import RSS
|
||||
from couchpotato.core.helpers.variable import tryInt
|
||||
from couchpotato.core.logger import CPLog
|
||||
from couchpotato.core.providers.nzb.base import NZBProvider
|
||||
from urllib import quote_plus
|
||||
from dateutil.parser import parse
|
||||
import re
|
||||
import time
|
||||
|
||||
@@ -14,7 +16,7 @@ class X264(NZBProvider, RSS):
|
||||
urls = {
|
||||
'download': 'http://85.214.105.230/get_nzb.php?id=%s§ion=hd',
|
||||
'search': 'http://85.214.105.230/x264/requests.php?release=%s&status=FILLED&age=700&sort=ID',
|
||||
'regex': '<tr class="req_filled"><td class="reqid">(?P<id>.*?)</td><td class="release">(?P<title>.*?)</td>',
|
||||
'regex': '<tr class="req_filled"><td class="reqid">(?P<id>.*?)</td><td class="release">(?P<title>.*?)</td>.+?<td class="age">(?P<age>\d+)d.+?</td>',
|
||||
}
|
||||
|
||||
def search(self, movie, quality):
|
||||
@@ -30,13 +32,16 @@ class X264(NZBProvider, RSS):
|
||||
match = re.compile(self.urls['regex'], re.DOTALL).finditer(data)
|
||||
|
||||
for nzb in match:
|
||||
age = nzb.group('age')
|
||||
if not age:
|
||||
age = 1
|
||||
new = {
|
||||
'id': nzb.group('id'),
|
||||
'name': nzb.group('title'),
|
||||
'type': 'nzb',
|
||||
'provider': self.getName(),
|
||||
'age': self.calculateAge(time.time()),
|
||||
'size': 9999,
|
||||
'age': tryInt(age),
|
||||
'size': None,
|
||||
'url': self.urls['download'] % (nzb.group('id')),
|
||||
'download': self.download,
|
||||
'detail_url': '',
|
||||
@@ -57,8 +62,14 @@ class X264(NZBProvider, RSS):
|
||||
def download(self, url = '', nzb_id = ''):
|
||||
try:
|
||||
log.info('Downloading nzb from #alt.binaries.hdtv.x264, request id: %s ' % nzb_id)
|
||||
|
||||
return self.urlopen(self.urls['download'] % nzb_id)
|
||||
|
||||
except Exception, e:
|
||||
log.error('Failed downloading from #alt.binaries.hdtv.x264: %s' % e)
|
||||
return False
|
||||
|
||||
def belongsTo(self, url, host = None):
|
||||
match = re.match('http://85\.214\.105\.230/get_nzb\.php\?id=[0-9]*§ion=hd', url)
|
||||
if match:
|
||||
return self
|
||||
return
|
||||
Reference in New Issue
Block a user