Trailers not downloading. fix #1563
This commit is contained in:
@@ -90,21 +90,18 @@ class HDTrailers(TrailerProvider):
|
|||||||
html = BeautifulSoup(data, parse_only = tables)
|
html = BeautifulSoup(data, parse_only = tables)
|
||||||
result_table = html.find('table', attrs = {'class':'bottomTable'})
|
result_table = html.find('table', attrs = {'class':'bottomTable'})
|
||||||
|
|
||||||
|
|
||||||
for tr in result_table.find_all('tr'):
|
for tr in result_table.find_all('tr'):
|
||||||
trtext = str(tr).lower()
|
trtext = str(tr).lower()
|
||||||
if 'clips' in trtext:
|
if 'clips' in trtext:
|
||||||
break
|
break
|
||||||
if 'trailer' in trtext and not 'clip' in trtext and provider in trtext:
|
|
||||||
nr = 0
|
if 'trailer' in trtext and not 'clip' in trtext and provider in trtext and not '3d' in trtext:
|
||||||
if 'trailer' not in tr.find('span', 'standardTrailerName').text.lower():
|
if 'trailer' not in tr.find('span', 'standardTrailerName').text.lower():
|
||||||
continue
|
continue
|
||||||
resolutions = tr.find_all('td', attrs = {'class':'bottomTableResolution'})
|
resolutions = tr.find_all('td', attrs = {'class':'bottomTableResolution'})
|
||||||
for res in resolutions:
|
for res in resolutions:
|
||||||
results[str(res.a.contents[0])].insert(0, res.a['href'])
|
if res.a:
|
||||||
nr += 1
|
results[str(res.a.contents[0])].insert(0, res.a['href'])
|
||||||
|
|
||||||
return results
|
|
||||||
|
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
log.debug('No trailers found in provider %s.', provider)
|
log.debug('No trailers found in provider %s.', provider)
|
||||||
|
|||||||
Reference in New Issue
Block a user