Merge pull request #470 from JackDandy/feature/FixTokyoParsing

Fix issue parsing items in ToktoToshokan provider.
This commit is contained in:
JackDandy 2015-07-20 17:36:19 +01:00
commit 0a8485a358
3 changed files with 6 additions and 1 deletions

View file

@ -102,6 +102,7 @@
* Change pyNMA use of urllib to requests (ref:hacks.txt)
* Change Trakt url to fix baseline uses (e.g. add from trending)
* Fix edit on show page for shows that have anime enabled in mass edit
* Fix issue parsing items in ToktoToshokan provider
* Change to only show option "End upgrade on first match" on edit show page if quality custom is selected
* Change label "Show is grouped in" in edit show page to "Show is in group" and move the section higher

View file

@ -1010,6 +1010,10 @@ div.formpaginate{
font-weight:900
}
#addShowForm #blackwhitelist{
padding:0 0 0 15px
}
#addShowForm #blackwhitelist,
#addShowForm #blackwhitelist h4,
#addShowForm #blackwhitelist p{

View file

@ -52,7 +52,7 @@ class TokyoToshokanProvider(generic.TorrentProvider):
torrent_table = soup.find('table', attrs={'class': 'listing'})
torrent_rows = torrent_table.find_all('tr') if torrent_table else []
if torrent_rows:
a = (0, 1)[torrent_rows[0].find('td', attrs={'class': 'centertext'})]
a = (0, 1)[None is not torrent_rows[0].find('td', attrs={'class': 'centertext'})]
for top, bottom in zip(torrent_rows[a::2], torrent_rows[a::2]):
title = top.find('td', attrs={'class': 'desc-top'}).text