Library update
This commit is contained in:
1 parent
bd5170bc8e
commit
02855c7b9c
115 files changed
+22575
-2880
No files matched your search
@@ -1,4 +1,4 @@
|
||||
from BeautifulSoup import BeautifulSoup
|
||||
from bs4 import BeautifulSoup
|
||||
from couchpotato.core.event import fireEvent
|
||||
from couchpotato.core.helpers.encoding import toUnicode, tryUrlencode, \
|
||||
simplifyString
|
||||
@@ -49,21 +49,21 @@ class Mysterbin(NZBProvider):
|
||||
try:
|
||||
html = BeautifulSoup(data)
|
||||
resultable = html.find('table', attrs = {'class':'t'})
|
||||
for result in resultable.findAll('tr'):
|
||||
for result in resultable.find_all('tr'):
|
||||
|
||||
try:
|
||||
myster_id = result.find('input', attrs = {'class': 'check4nzb'})['value']
|
||||
|
||||
# Age
|
||||
age = ''
|
||||
for temp in result.find('td', attrs = {'class': 'cdetail'}).findAll(text = True):
|
||||
for temp in result.find('td', attrs = {'class': 'cdetail'}).find_all(text = True):
|
||||
if 'days' in temp:
|
||||
age = tryInt(temp.split(' ')[0])
|
||||
break
|
||||
|
||||
# size
|
||||
size = None
|
||||
for temp in result.find('div', attrs = {'class': 'cdetail'}).findAll(text = True):
|
||||
for temp in result.find('div', attrs = {'class': 'cdetail'}).find_all(text = True):
|
||||
if 'gb' in temp.lower() or 'mb' in temp.lower() or 'kb' in temp.lower():
|
||||
size = self.parseSize(temp)
|
||||
break
|
||||
@@ -74,7 +74,7 @@ class Mysterbin(NZBProvider):
|
||||
|
||||
new = {
|
||||
'id': myster_id,
|
||||
'name': ''.join(result.find('span', attrs = {'class': 'cname'}).findAll(text = True)),
|
||||
'name': ''.join(result.find('span', attrs = {'class': 'cname'}).find_all(text = True)),
|
||||
'type': 'nzb',
|
||||
'provider': self.getName(),
|
||||
'age': age,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from BeautifulSoup import BeautifulSoup
|
||||
from bs4 import BeautifulSoup
|
||||
from couchpotato.core.event import fireEvent
|
||||
from couchpotato.core.helpers.encoding import toUnicode, tryUrlencode, \
|
||||
simplifyString
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from BeautifulSoup import BeautifulSoup
|
||||
from bs4 import BeautifulSoup
|
||||
from couchpotato.core.event import fireEvent
|
||||
from couchpotato.core.helpers.encoding import toUnicode, tryUrlencode, \
|
||||
simplifyString
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from BeautifulSoup import BeautifulSoup
|
||||
from bs4 import BeautifulSoup
|
||||
from couchpotato.core.event import fireEvent
|
||||
from couchpotato.core.helpers.variable import tryInt, getTitle
|
||||
from couchpotato.core.logger import CPLog
|
||||
@@ -47,14 +47,14 @@ class KickAssTorrents(TorrentProvider):
|
||||
try:
|
||||
html = BeautifulSoup(data)
|
||||
resultdiv = html.find('div', attrs = {'class':'tabs'})
|
||||
for result in resultdiv.findAll('div', recursive = False):
|
||||
for result in resultdiv.find_all('div', recursive = False):
|
||||
if result.get('id').lower() not in cat_ids:
|
||||
continue
|
||||
|
||||
try:
|
||||
|
||||
try:
|
||||
for temp in result.findAll('tr'):
|
||||
for temp in result.find_all('tr'):
|
||||
if temp['class'] is 'firstr' or not temp.get('id'):
|
||||
continue
|
||||
|
||||
@@ -68,15 +68,15 @@ class KickAssTorrents(TorrentProvider):
|
||||
}
|
||||
|
||||
nr = 0
|
||||
for td in temp.findAll('td'):
|
||||
for td in temp.find_all('td'):
|
||||
column_name = table_order[nr]
|
||||
if column_name:
|
||||
|
||||
if column_name is 'name':
|
||||
link = td.find('div', {'class': 'torrentname'}).findAll('a')[1]
|
||||
link = td.find('div', {'class': 'torrentname'}).find_all('a')[1]
|
||||
new['id'] = temp.get('id')[-8:]
|
||||
new['name'] = link.text
|
||||
new['url'] = td.findAll('a', 'idownload')[1]['href']
|
||||
new['url'] = td.find_all('a', 'idownload')[1]['href']
|
||||
if new['url'][:2] == '//':
|
||||
new['url'] = 'http:%s' % new['url']
|
||||
new['score'] = 20 if td.find('a', 'iverif') else 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from BeautifulSoup import SoupStrainer, BeautifulSoup
|
||||
from bs4 import SoupStrainer, BeautifulSoup
|
||||
from couchpotato.core.helpers.encoding import tryUrlencode
|
||||
from couchpotato.core.helpers.variable import mergeDicts, getTitle
|
||||
from couchpotato.core.logger import CPLog
|
||||
@@ -51,13 +51,13 @@ class HDTrailers(TrailerProvider):
|
||||
|
||||
try:
|
||||
tables = SoupStrainer('div')
|
||||
html = BeautifulSoup(data, parseOnlyThese = tables)
|
||||
result_table = html.findAll('h2', text = re.compile(movie_name))
|
||||
html = BeautifulSoup(data, parse_only = tables)
|
||||
result_table = html.find_all('h2', text = re.compile(movie_name))
|
||||
|
||||
for h2 in result_table:
|
||||
if 'trailer' in h2.lower():
|
||||
parent = h2.parent.parent.parent
|
||||
trailerLinks = parent.findAll('a', text = re.compile('480p|720p|1080p'))
|
||||
trailerLinks = parent.find_all('a', text = re.compile('480p|720p|1080p'))
|
||||
try:
|
||||
for trailer in trailerLinks:
|
||||
results[trailer].insert(0, trailer.parent['href'])
|
||||
@@ -74,11 +74,11 @@ class HDTrailers(TrailerProvider):
|
||||
results = {'480p':[], '720p':[], '1080p':[]}
|
||||
try:
|
||||
tables = SoupStrainer('table')
|
||||
html = BeautifulSoup(data, parseOnlyThese = tables)
|
||||
html = BeautifulSoup(data, parse_only = tables)
|
||||
result_table = html.find('table', attrs = {'class':'bottomTable'})
|
||||
|
||||
|
||||
for tr in result_table.findAll('tr'):
|
||||
for tr in result_table.find_all('tr'):
|
||||
trtext = str(tr).lower()
|
||||
if 'clips' in trtext:
|
||||
break
|
||||
@@ -86,7 +86,7 @@ class HDTrailers(TrailerProvider):
|
||||
nr = 0
|
||||
if 'trailer' not in tr.find('span', 'standardTrailerName').text.lower():
|
||||
continue
|
||||
resolutions = tr.findAll('td', attrs = {'class':'bottomTableResolution'})
|
||||
resolutions = tr.find_all('td', attrs = {'class':'bottomTableResolution'})
|
||||
for res in resolutions:
|
||||
results[str(res.a.contents[0])].insert(0, res.a['href'])
|
||||
nr += 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from BeautifulSoup import BeautifulSoup
|
||||
from bs4 import BeautifulSoup
|
||||
from couchpotato.core.providers.userscript.base import UserscriptBase
|
||||
|
||||
class AlloCine(UserscriptBase):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from BeautifulSoup import BeautifulSoup
|
||||
from bs4 import BeautifulSoup
|
||||
from couchpotato.core.event import fireEvent
|
||||
from couchpotato.core.providers.userscript.base import UserscriptBase
|
||||
|
||||
|
||||
Reference in new issue
Block a user