feat: 写入 upper 头像,整理代码

This commit is contained in:
amtoaer
2024-03-27 23:26:22 +08:00
parent 986bb11a13
commit 29d893e3fc
4 changed files with 92 additions and 45 deletions

View File

@@ -3,16 +3,18 @@ use std::sync::Arc;
use bili_sync::bilibili::BiliClient;
use bili_sync::core::command::process_favorite;
use bili_sync::database::database_connection;
use log::error;
#[tokio::main]
async fn main() -> ! {
env_logger::init();
let connection = Arc::new(database_connection().await.unwrap());
let bili_client = Arc::new(BiliClient::new(None));
loop {
for fid in [52642258] {
for fid in ["52642258"] {
let res = process_favorite(bili_client.clone(), fid, connection.clone()).await;
if let Err(e) = res {
eprintln!("Error: {:?}", e);
error!("Error: {e}");
}
}
tokio::time::sleep(std::time::Duration::from_secs(600)).await;