Browse Source

Use imdb identfier on sceneaccess. fix #648

pull/662/merge
Ruud 13 years ago
parent
commit
60e0eed26b
  1. 13
      couchpotato/core/providers/torrent/sceneaccess/main.py

13
couchpotato/core/providers/torrent/sceneaccess/main.py

@ -1,8 +1,7 @@
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
from couchpotato.core.event import fireEvent from couchpotato.core.event import fireEvent
from couchpotato.core.helpers.encoding import simplifyString, tryUrlencode, \ from couchpotato.core.helpers.encoding import tryUrlencode, toUnicode
toUnicode from couchpotato.core.helpers.variable import tryInt
from couchpotato.core.helpers.variable import getTitle, tryInt
from couchpotato.core.logger import CPLog from couchpotato.core.logger import CPLog
from couchpotato.core.providers.torrent.base import TorrentProvider from couchpotato.core.providers.torrent.base import TorrentProvider
import traceback import traceback
@ -39,9 +38,10 @@ class SceneAccess(TorrentProvider):
self.getCatId(quality['identifier'])[0] self.getCatId(quality['identifier'])[0]
) )
q = '"%s %s" %s' % (simplifyString(getTitle(movie['library'])), movie['library']['year'], quality.get('identifier')) q = '%s %s' % (movie['library']['identifier'], quality.get('identifier'))
arguments = tryUrlencode({ arguments = tryUrlencode({
'search': q, 'search': q,
'method': 1,
}) })
url = "%s&%s" % (url, arguments) url = "%s&%s" % (url, arguments)
@ -57,7 +57,10 @@ class SceneAccess(TorrentProvider):
try: try:
resultsTable = html.find('table', attrs = {'id' : 'torrents-table'}) resultsTable = html.find('table', attrs = {'id' : 'torrents-table'})
entries = resultsTable.findAll('tr', attrs = {'class' : 'tt_row'}) if resultsTable is None:
return results
entries = resultsTable.find_all('tr', attrs = {'class' : 'tt_row'})
for result in entries: for result in entries:
link = result.find('td', attrs = {'class' : 'ttr_name'}).find('a') link = result.find('td', attrs = {'class' : 'ttr_name'}).find('a')

Loading…
Cancel
Save