[opensubtitles] fix #1295
This commit is contained in:
parent
18e9e4a779
commit
6c9bb44c4b
1 changed files with 3 additions and 4 deletions
|
|
@ -41,7 +41,7 @@ class SearchPage(BasePage):
|
|||
if len(links) > 0:
|
||||
a = links[0]
|
||||
url = a.attrib.get('href', '')
|
||||
if "ads.opensubtitles" not in url:
|
||||
if "ads2.opensubtitles" not in url:
|
||||
self.browser.location("http://www.opensubtitles.org%s" % url)
|
||||
assert self.browser.is_on_page(SubtitlesPage) or self.browser.is_on_page(SubtitlePage)
|
||||
# subtitles page does the job
|
||||
|
|
@ -107,9 +107,8 @@ class SubtitlePage(BasePage):
|
|||
"""
|
||||
def get_subtitle(self):
|
||||
desc = NotAvailable
|
||||
father = self.parser.select(self.document.getroot(), 'a#app_link', 1).getparent()
|
||||
a = self.parser.select(father, 'a')[1]
|
||||
id = a.attrib.get('href', '').split('/')[-1]
|
||||
a = self.parser.select(self.document.getroot(), 'a#bt-dwl', 1)
|
||||
id = a.attrib.get('rel', '').split('/')[-1]
|
||||
m = re.match('Download \((\w+)\)', self.parser.tocleanstring(a))
|
||||
if m:
|
||||
ext = m.group(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue