1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
use Duration;
use ;
use RecentChangesPatroller;
use ;
use ;
async
async
/*
async fn main_() -> wiki::Result<()> {
let site = Site::enwiki();
let bot = site
.login(
BotPassword::new("ScannerBot@RustWiki", include_str!("../veryverysecret")), // BotPassword::new("0xDeadbeef@Testing", include_str!("../verysecret")),
Duration::from_secs(5),
)
.await
.map_err(|(_, e)| e)?;
let rcp = RecentChangesPatroller::new(
bot,
Duration::from_secs(2),
RcProp::ORES_SCORES | RcProp::TAGS | RcProp::TITLE | RcProp::TIMESTAMP,
RcType::EDIT,
);
tokio::spawn(async move {
rcp.try_for_each_concurrent(None, |x| async move {
println!("{:?}", x.oresscores);
Ok(())
})
.await
});
tokio::time::sleep(Duration::from_secs(100)).await;
Ok(())
}*/