diff --git a/citation_crawler/__main__.py b/citation_crawler/__main__.py index 20a98c2..4f987f5 100644 --- a/citation_crawler/__main__.py +++ b/citation_crawler/__main__.py @@ -112,7 +112,8 @@ async def filter_papers(self, papers): parser_n4j.add_argument("--username", type=str, default=None, help=f'Auth username to neo4j database.') parser_n4j.add_argument("--password", type=str, default=None, help=f'Auth password to neo4j database.') parser_n4j.add_argument("--uri", type=str, required=True, help=f'URI to neo4j database.') -parser_n4j.add_argument("--no-skip-exists", action="store_true", help=f'Do not skip exists references. Use it when you want to rewrite all papers.') +parser_n4j.add_argument("--no-skip-exists", action="store_true", + help=f'Do not skip exists references. Use it when you want to rewrite all papers.') async def func_parser_n4j_async(parser): diff --git a/citation_crawler/crawlers/common.py b/citation_crawler/crawlers/common.py index c994419..c7c489e 100644 --- a/citation_crawler/crawlers/common.py +++ b/citation_crawler/crawlers/common.py @@ -61,12 +61,12 @@ async def download_item(url: str, path: str, cache_days: int, is_valid: Callable async with file_sem: try: async with async_open(save_path, 'r') as f: - logger.debug("use cache: %s -> %s" % (path, url)) + logger.info("use cache: %s -> %s" % (path, url)) text = await f.read() assert is_valid(text) return text except: - logger.debug(" no cache: %s" % save_path) + logger.info(" no cache: %s" % save_path) if os.path.exists(save_path): logger.info("err cache: %s" % save_path) try: @@ -89,7 +89,7 @@ async def download_item(url: str, path: str, cache_days: int, is_valid: Callable async with session.get(url, proxy=os.getenv("HTTP_PROXY"), timeout=os.getenv("HTTP_TIMEOUT") or 30) as response: - logger.debug(" download: %s <- %s" % (path, url)) + logger.info(" download: %s <- %s" % (path, url)) text = await response.text() assert is_valid(text) os.makedirs(os.path.dirname(save_path), exist_ok=True) diff --git a/setup.py b/setup.py index a63943e..1b2e101 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ setup( name='citation_crawler', - version='2.9.2', + version='2.9.4', author='yindaheng98', author_email='yindaheng98@gmail.com', url='https://github.com/yindaheng98/citation-crawler',