get more history on cards
This commit is contained in:
parent
3857eec659
commit
188220e0c1
1 changed files with 12 additions and 1 deletions
|
|
@ -61,4 +61,15 @@ class CardHistory(BasePage):
|
|||
yield operation
|
||||
|
||||
def get_next_url(self):
|
||||
items = self.document.getroot().cssselect('ul.menu-lvl-1 li')
|
||||
|
||||
current = False
|
||||
for li in reversed(items):
|
||||
if li.attrib.get('class', '') == 'active':
|
||||
current = True
|
||||
elif current:
|
||||
a = li.find('a')
|
||||
if 'year' in a.attrib.get('href', ''):
|
||||
return a.attrib['href']
|
||||
else:
|
||||
return None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue