arkbot 0.4.1

A Rust rewrite (and complete redesign) of Arkanosis' Wikipedia bot
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use reqwest::blocking::Client;
use std::io::BufRead;

pub fn download(url: &str) -> Box<dyn BufRead> {
    let client = Client::builder()
        .user_agent(crate::user_agent())
        .build()
        .unwrap();
    let bz_stream = client
        .get(url)
        .send();
    let xml_stream = std::io::BufReader::new(bzip2::read::BzDecoder::new(bz_stream.unwrap()));
    Box::new(xml_stream)
 }