mirror of
https://github.com/kristoferssolo/tg-relay-rs.git
synced 2025-12-30 13:31:38 +00:00
chore(instagram): change function name
This commit is contained in:
parent
8e339e53c7
commit
881d730483
@ -110,7 +110,7 @@ async fn run_command_in_tempdir(cmd: &str, args: &[&str]) -> Result<DownloadResu
|
|||||||
///
|
///
|
||||||
/// - Propagates `run_command_in_tempdir` errors.
|
/// - Propagates `run_command_in_tempdir` errors.
|
||||||
#[cfg(feature = "instagram")]
|
#[cfg(feature = "instagram")]
|
||||||
pub async fn download_instaloader(url: &str) -> Result<DownloadResult> {
|
pub async fn download_instagram(url: &str) -> Result<DownloadResult> {
|
||||||
let base_args = ["--extractor-args", "instagram:"];
|
let base_args = ["--extractor-args", "instagram:"];
|
||||||
let mut args = base_args
|
let mut args = base_args
|
||||||
.iter()
|
.iter()
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
use crate::download::{download_instaloader, process_download_result};
|
use crate::download::{download_instagram, process_download_result};
|
||||||
use crate::error::Result;
|
use crate::error::Result;
|
||||||
use crate::handlers::SocialHandler;
|
use crate::handlers::SocialHandler;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
@ -42,8 +42,8 @@ impl SocialHandler for InstagramHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn handle(&self, bot: &Bot, chat_id: ChatId, url: String) -> Result<()> {
|
async fn handle(&self, bot: &Bot, chat_id: ChatId, url: String) -> Result<()> {
|
||||||
info!(handler = %self.name(), url = %url, "handling instagram code");
|
info!(handler = %self.name(), url = %url, "handling instagram url");
|
||||||
let dr = download_instaloader(&url).await?;
|
let dr = download_instagram(&url).await?;
|
||||||
process_download_result(bot, chat_id, dr).await
|
process_download_result(bot, chat_id, dr).await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user