Selene core functionality and parent objects¶
Submodules¶
selene.core.crawler module¶
- class selene.core.crawler.Crawler(id_crawler='Crawler', debug=True)[source]¶
Bases:
object
A parent crawler class to assist any worflow.
selene.core.element module¶
selene.core.logger module¶
- selene.core.logger.get_logger(name='log', level='INFO', to_console=True, to_file=False, overwrite=False, dirpath='/notebooks/selene_logger', filename='log.log')[source]¶
Initialise a logger instance to print, either to file or to a notebook.
- Parameters:
name (str) – the name of the logger
level (str) – the loglevel of the log. Can be DEBUG, INFO, WARNING or EXCEPTION (default INFO)
to_console (bool) – whether or not to print the log to console/notebook
to_file (bool) – whether or not to print the log to a file
overwrite (bool) – whether or not to overwrite an existing file
dirpath (str) – the path to a directory to save the log (if to_file is True)
filename (str) – the path to a file to save the log (if to_file is True)
- Returns:
logger – the logger instance
- Return type:
logging.Logger