This commit is contained in:
Syfaro 2019-09-27 12:48:24 -05:00
parent 63c6f64062
commit 2c5836109c
3 changed files with 782 additions and 654 deletions

1428
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -13,4 +13,4 @@ chrono = "^0.4"
[dependencies.furaffinity-rs] [dependencies.furaffinity-rs]
git = "https://git.huefox.com/syfaro/furaffinity-rs" git = "https://git.huefox.com/syfaro/furaffinity-rs"
rev = "9a131bdf3b88ba9ba532ba262643be5b1efa3a5d" rev = "35478cb1402b26842900546f5cb1130238866c22"

View File

@ -100,7 +100,9 @@ fn main() {
std::env::var("FA_B").expect("missing fa cookie b"), std::env::var("FA_B").expect("missing fa cookie b"),
); );
let fa = furaffinity_rs::FurAffinity::new(cookie_a, cookie_b); let user_agent = std::env::var("USER_AGENT").expect("missing user agent");
let fa = furaffinity_rs::FurAffinity::new(cookie_a, cookie_b, user_agent);
let dsn = std::env::var("POSTGRES_DSN").expect("missing postgres dsn"); let dsn = std::env::var("POSTGRES_DSN").expect("missing postgres dsn");
@ -114,7 +116,7 @@ fn main() {
let latest_id = fa.latest_id().expect("unable to get latest id"); let latest_id = fa.latest_id().expect("unable to get latest id");
'id: for id in ids_to_check(&client, latest_id) { for id in ids_to_check(&client, latest_id) {
'attempt: for attempt in 0..3 { 'attempt: for attempt in 0..3 {
if !has_submission(&client, id) { if !has_submission(&client, id) {
println!("loading submission {}", id); println!("loading submission {}", id);