https://github.com/julien-cpsn/google-scholar-query
https://github.com/julien-cpsn/google-scholar-query
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/julien-cpsn/google-scholar-query
- Owner: Julien-cpsn
- License: gpl-3.0
- Created: 2025-02-20T17:39:47.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2025-02-20T23:46:14.000Z (3 months ago)
- Last Synced: 2025-02-21T00:45:19.685Z (3 months ago)
- Language: Rust
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## google-scholar-query
The unofficial Google Scholar API
```rust
fn query_google_scholar() {
let scholar_query = scholar::ScholarArgs{
query: String::from("machine-learning"),
cite_id: None,
from_year: Some(2018),
to_year: Some(2021),
sort_by: Some(0),
cluster_id: None,
lang: Some(String::from("en")),
lang_limit: None,
limit: Some(3),
offset: Some(0),
adult_filtering: None,
include_similar_results: None,
include_citations: None,
};
let client = scholar::init_client();
match client.scrape_scholar(Box::from(scholar_query)).await {
Ok(result) => assert_eq ! (result.len(), 3),
Err(_e) => assert_eq ! (true, false),
};
}
```