1
0
Fork 0
mirror of https://gitlab.com/news-flash/article_scraper.git synced 2025-07-07 16:15:32 +02:00

Merge branch 'reqwest-0.12' into 'master'

Reqwest 0.12

See merge request news-flash/article_scraper!10
This commit is contained in:
Jan Lukas Gernert 2024-03-24 20:54:27 +00:00
commit e4140ff093
4 changed files with 12 additions and 13 deletions

View file

@ -4,7 +4,7 @@ stages:
run-build:
stage: build
image: rust:latest
image: rust:1.77
before_script:
- rustup component add rustfmt
- rustup component add clippy
@ -12,4 +12,4 @@ run-build:
- rustc --version && cargo --version
- cargo fmt -- --check
- cargo clippy --all-targets --all-features -- -D warnings
- cargo build --release --jobs 1
- cargo build --release

View file

@ -13,16 +13,16 @@ exclude = ["resources/tests"]
[dependencies]
thiserror = "1.0"
libxml = "0.3"
reqwest = { version = "0.11", features = ["json", "native-tls", "gzip", "brotli", "stream"] }
reqwest = { version = "0.12", features = ["json", "native-tls", "gzip", "brotli", "stream"] }
tokio = { version = "1", features = ["macros", "fs", "io-util"] }
url = "2.5"
regex = "1.10"
encoding_rs = "0.8"
chrono = "0.4"
base64 = "0.21"
image = "0.24"
base64 = "0.22"
image = "0.25"
log = "0.4"
rust-embed="8.2"
rust-embed="8.3"
once_cell = "1.19"
escaper = "0.1"
futures = "0.3"

View file

@ -6,7 +6,7 @@ use crate::constants;
use crate::util::Util;
use base64::Engine;
use futures::StreamExt;
use image::ImageOutputFormat;
use image::ImageFormat;
use libxml::parser::Parser;
use libxml::tree::{Node, SaveOptions};
use libxml::xpath::Context;
@ -324,8 +324,7 @@ impl ImageDownloader {
image::imageops::FilterType::Lanczos3,
);
let mut resized_buf: Vec<u8> = Vec::new();
if let Err(error) =
image.write_to(&mut Cursor::new(&mut resized_buf), ImageOutputFormat::Png)
if let Err(error) = image.write_to(&mut Cursor::new(&mut resized_buf), ImageFormat::Png)
{
log::error!("Failed to save resized image to resize: {}", error);
return None;

View file

@ -9,10 +9,10 @@ repository = "https://gitlab.com/news-flash/article_scraper"
[dependencies]
article_scraper = { path = "../article_scraper/" }
clap = { version = "4.2", features = [ "derive" ] }
clap = { version = "4.5", features = [ "derive" ] }
simplelog = "0.12"
log = "0.4"
url = "2.3"
reqwest = { version = "0.11", features = ["json", "native-tls", "gzip", "brotli", "stream"] }
tokio = { version = "1.27", features = ["macros", "fs", "io-util", "rt-multi-thread" ] }
url = "2.5"
reqwest = { version = "0.12", features = ["json", "native-tls", "gzip", "brotli", "stream"] }
tokio = { version = "1", features = ["macros", "fs", "io-util", "rt-multi-thread" ] }
indicatif = "0.17"