Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/OpenByteDev/SciHub-Scraper
Scraps paper pdf urls from sci-hub.
https://github.com/OpenByteDev/SciHub-Scraper
scihub scraper web
Last synced: 5 days ago
JSON representation
Scraps paper pdf urls from sci-hub.
- Host: GitHub
- URL: https://github.com/OpenByteDev/SciHub-Scraper
- Owner: OpenByteDev
- License: mit
- Created: 2020-04-26T23:22:20.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-12T02:04:37.000Z (over 3 years ago)
- Last Synced: 2024-05-14T03:03:02.315Z (6 months ago)
- Topics: scihub, scraper, web
- Language: Rust
- Size: 35.2 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SciHub Scraper
[![crates.io](https://img.shields.io/crates/v/scihub-scraper.svg)](https://crates.io/crates/scihub-scraper)
[![Documentation](https://docs.rs/scihub-scraper/badge.svg)](https://docs.rs/scihub-scraper)
[![dependency status](https://deps.rs/repo/github/openbytedev/scihub-scraper/status.svg)](https://deps.rs/repo/github/openbytedev/scihub-scraper)
[![MIT](https://img.shields.io/crates/l/scihub-scraper.svg)](https://github.com/OpenByteDev/SciHub-Scraper/blob/master/LICENSE)SciHub Scraper can be used to scrap paper info including its pdf url from sci-hub.
Sci-hub domains are automatically fetched from [sci-hub.now.sh](https://sci-hub.now.sh/),
but can also be manually provided by using `SciHubScraper::with_base_urls`## Usage
To extract all available information about a paper use `SciHubScraper.fetch_paper_by_doi` and associated methods:
```rust
let mut scraper = SciHubScraper::new();
let paper = scraper.fetch_paper_by_doi("10.1016/j.tplants.2018.11.001").await?;
println!("Title = {}", paper.title);
println!("PDF Url = {}", paper.download_url);
```Alernatively `SciHubScraper.fetch_paper_pdf_url_by_doi` and associated methods can also be used to extract the PDF Url of a paper.
It only extracts the url using a different method and is therefore faster.```rust
let mut scraper = SciHubScraper::new();
let pdf_url = scraper.fetch_paper_pdf_url_by_doi("10.1016/j.tplants.2018.11.001").await?;
println!("PDF Url = {}", pdf_url);
```## License
Licensed under MIT license ([LICENSE](https://github.com/OpenByteDev/SciHub-Scraper/blob/master/LICENSE) or http://opensource.org/licenses/MIT)