Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
Adding pub date check to standard run
Browse files Browse the repository at this point in the history
  • Loading branch information
rabdill committed Feb 13, 2019
1 parent 6031ed7 commit b86692f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion spider/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"fetch_abstracts": True, # Check for any Rxivist papers missing an abstract and fill it in (Papers don't have an abstract when first crawled)
"fetch_crossref": False, # Update daily Crossref stats
"refresh_stats": False, # Look for articles with outdated download info and re-crawl them
"fetch_pubstatus": True # Check for whether a paper has been published during stat refresh
"fetch_pubstatus": True, # Check for whether a paper has been published during stat refresh
"fetch_pubdates": True # Check for publication dates for any papers that have been published
}

perform_ranks = {
Expand Down
9 changes: 7 additions & 2 deletions spider/spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,12 @@ def full_run(spider):
if config.crawl["fetch_crossref"] is not False:
spider.pull_todays_crossref_data()
else:
spider.log.record("Skipping call to fetch Crossref data: disabled in configuration file.", 'debug')
spider.log.record("Skipping call to fetch Crossref Twitter data: disabled in configuration file.", 'debug')

if config.crawl["fetch_pubdates"] is not False:
get_publication_dates(spider)
else:
spider.log.record("Skipping call to fetch Crossref publication data: disabled in configuration file.", 'debug')

spider.calculate_vectors()

Expand Down Expand Up @@ -1023,7 +1028,7 @@ def get_publication_dates(spider):
break
done += 1
if config.polite:
time.sleep(2)
time.sleep(3)
article_id = article[0]
doi = article[1]
spider.log.record(f"Checking DOI {doi}", 'debug')
Expand Down

0 comments on commit b86692f

Please sign in to comment.