do not follow spam links
This commit is contained in:
parent
847c91b1b3
commit
e1eb1b80af
2 changed files with 10 additions and 9 deletions
|
|
@ -102,13 +102,15 @@ class _AccountsPage(BasePage):
|
|||
|
||||
yield account
|
||||
|
||||
def cards_page(self):
|
||||
try:
|
||||
return self.document.xpath('//table[@class="ca-table"]' +
|
||||
'/tr[@class="ligne-connexe"]' +
|
||||
'//a/@href')[0]
|
||||
except IndexError:
|
||||
pass
|
||||
def cards_pages(self):
|
||||
for line in self.document.xpath('//table[@class="ca-table"]/tr[@class="ligne-connexe"]'):
|
||||
try:
|
||||
link = line.xpath('.//a/@href')[0]
|
||||
except IndexError:
|
||||
pass
|
||||
else:
|
||||
if not link.startswith('javascript:'):
|
||||
yield link
|
||||
|
||||
|
||||
class CardsPage(BasePage):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue