clean up getfromnet
This commit is contained in:
parent
0ba4168b85
commit
daa4c82286
1 changed files with 4 additions and 2 deletions
|
@ -1,9 +1,11 @@
|
||||||
use wikidata::*;
|
use wikidata::*;
|
||||||
use reqwest;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
for i in 1_usize.. {
|
for i in 1_usize.. {
|
||||||
let uri = format!("https://www.wikidata.org/wiki/Special:EntityData/Q{}.json", i);
|
let uri = format!(
|
||||||
|
"https://www.wikidata.org/wiki/Special:EntityData/Q{}.json",
|
||||||
|
i
|
||||||
|
);
|
||||||
let res = reqwest::blocking::get(uri).unwrap();
|
let res = reqwest::blocking::get(uri).unwrap();
|
||||||
let text = res.text().unwrap();
|
let text = res.text().unwrap();
|
||||||
if text.contains("<h1>Not Found</h1><p>No entity with ID ") {
|
if text.contains("<h1>Not Found</h1><p>No entity with ID ") {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue