mirror of
https://git.zavage.net/Zavage-Software/wikicrawl.git
synced 2024-11-23 08:40:25 -07:00
fix
This commit is contained in:
parent
6ae2a8dd06
commit
7e9922168f
@ -69,7 +69,7 @@ class Model:
|
||||
self.ctx.log['cli'].warn('failed to process "%s" as a parameter' % n)
|
||||
return False
|
||||
for i in range(n):
|
||||
self.model.play_random_page()
|
||||
self.play_random_page()
|
||||
|
||||
|
||||
def play_random_page(self):
|
||||
|
@ -6,6 +6,7 @@ from . import browser
|
||||
from . import util
|
||||
from .assets.languages import LANGUAGES
|
||||
|
||||
import logging
|
||||
import re
|
||||
import selenium
|
||||
import time
|
||||
@ -220,13 +221,13 @@ class ArticlePage(PageRootObject):
|
||||
if len(links) == 0:
|
||||
return False
|
||||
for link in links:
|
||||
self.ctx.log['pages'].debug('processing link: %s' % link.text)
|
||||
logging.getLogger('pages').debug('processing link: %s' % link.text)
|
||||
if not self._is_valid_link(p, link):
|
||||
self.ctx.log['pages'].debug('skipping link inside parenthesis: %s' % link.text)
|
||||
logging.getLogger('pages').debug('skipping link inside parenthesis: %s' % link.text)
|
||||
self.highlight(link, 'blue')
|
||||
continue
|
||||
self.highlight(link, 'red')
|
||||
self.ctx.log['pages'].info('selected link: %s' % link.text)
|
||||
logging.getLogger('pages').info('selected link: %s' % link.text)
|
||||
self.click(link)
|
||||
return True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user