#NEWLINE# def crawl( self ) : #NEWLINE# #INDENT# now = time . time ( ) #NEWLINE# if ( not self . __crawlingStarted ) : #NEWLINE# #INDENT# self . __crawlingStarted = now #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . __crawlingStarted <= ( now - self . __class__ . reset_delay ( ) ) ) : #NEWLINE# #INDENT# self . __class__ . _log ( 'debug' , ( 'instance %s starts at front' % repr ( self ) ) ) #NEWLINE# self . __crawlingStarted = now #NEWLINE# self . _restart_at_front ( ) #NEWLINE# #UNINDENT# #UNINDENT# self . __class__ . _log ( 'debug' , ( 'instance %s starts crawling' % repr ( self ) ) ) #NEWLINE# try : #NEWLINE# #INDENT# self . _crawl ( ) #NEWLINE# #UNINDENT# except CrawlerError as e : #NEWLINE# #INDENT# self . __class__ . _log ( 'exception' , ( 'crawler error: %s' % repr ( e ) ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# e = sys . exc_info ( ) [ 0 ] #NEWLINE# self . __class__ . _log ( 'exception' , ( 'unexpected crawler error: %s' % repr ( e ) ) )