2023-05-14 23:28:09 +02:00
2023-05-02 12:12:06 +02:00
2023-05-02 12:11:18 +02:00
2023-05-05 10:00:59 +02:00
2023-05-02 12:03:03 +02:00
2023-05-14 23:28:09 +02:00
2023-05-02 12:11:18 +02:00

publication_scraper

A crawler to get all publications from WOS. All categories. For all wanted years.

Additional an uploader to push the Excel-files into Elasticsearch.

Requirements:

Check requirements.txt

Usage Crawler:

Start the crawler.

  • python wos_crawler.py The crawler downloads the publications for all categories and saves them as an Excel file.

Default download directory: location of the script

  • To change the directory, specify the path with the prefix directory= in the command line.
    • Example: python wos_crawler.py directory=path

Default years: 2020, 2021, 2022

  • To change the years, specify the wanted years with the prefix years= in the command line.
  • For multiple years, separate them with a comma.
  • Only once per year is allowed. The order doesn't matter.
    • Example: python wos_crawler.py years=2010,2011,2012,2013,2014

The downloaded files are uniquely named depending on their content.

  • Depending on their category, year and number of publications
  • A new download of already loaded data overwrites the old file.

The current download status is saved in the "wos_crawler_log.json" file.

  • To delete this file, only the word "delete" must be specified at the start.

    • Example: python wos_crawler.py delete
  • If the program is aborted, you can continue working at the previous position.

  • The additional parameters can be used as required.

    • Example: python wos_crawler.py years=2010,2011,2012,2013,2014 directory=path
    • Example: python wos_crawler.py years=2010,2011,2012,2013,2014 directory=path delete
    • Example: python wos_crawler.py directory=path years=2010,2011,2012,2013,2014
  • The order of the additional parameters is irrelevant.

Usage Uploader

Start the uploader.

  • python wos_iuploader.py path
  • The path to the excel files need to be given a command line parameter.
    • Subdirectories are allowed. The uploader uploads the publications from the excel-files (only .xls, no newer Excel-formats) into Elasticsearch.
  • Creates index if needed with settings and mapping.

Limitations (Crawler):

Due to the WOS limitation, the publications are only loaded up to 100,000 per year and category.

Limitations (Uploader):

If WOS updates their old .xls Excel-format to a newer one, the uploader needs to be updated as well.

If WOS changes their information order within the Excel-file, the uploader needs to be chenged as well.

Time (Crawler)

It takes about 20 seconds to load a category for a year. Each publication iteration (1-1000, 1001-2000...) takes about another 10 seconds.

  • 10s * (number_of_categories * number_of_years * (number_of_publications / 1000)) + 20s * (number_of_categories * number_of_years) = needed_time_to_crawl

  • Example: 2 categories, 3 years, 10.000 publications each

    • 10s * (2 * 3 * (10000 / 1000)) + 20s * (2 * 3) = 720s
  • Note that if problems occur during crawling, the runtime can increase significantly.

S
Description
No description provided
Readme
5.7 MiB
Languages
Python 100%