opensub, s/parser.select/getiterator/
This commit is contained in:
parent
8e0a245370
commit
968df91c4d
1 changed files with 3 additions and 1 deletions
|
|
@ -64,7 +64,9 @@ class SubtitlesPage(BasePage):
|
||||||
if len(tabresults) > 0:
|
if len(tabresults) > 0:
|
||||||
table = tabresults[0]
|
table = tabresults[0]
|
||||||
# for each result line, get informations
|
# for each result line, get informations
|
||||||
for line in self.parser.select(table,'tr'):
|
# why following line doesn't work all the time (for example 'search fr sopranos guy walks' ?
|
||||||
|
#for line in self.parser.select(table,'tr'):
|
||||||
|
for line in table.getiterator('tr'):
|
||||||
# some lines are useless, specially ads
|
# some lines are useless, specially ads
|
||||||
if line.attrib.get('id','').startswith('name'):
|
if line.attrib.get('id','').startswith('name'):
|
||||||
yield self.get_subtitle_from_line(line)
|
yield self.get_subtitle_from_line(line)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue