Skip to content

Commit

Permalink
feat: move scraper client to a local crate
Browse files Browse the repository at this point in the history
  • Loading branch information
lytovka committed Jun 3, 2023
1 parent 18ff059 commit 97ba15b
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 1,560 deletions.
14 changes: 11 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
genius = {path = "./genius"}
genius = { path = "./genius" }
scraper = { path = "./scraper" }
clap = { version = "4.3.0", features = ["derive"] }
dotenv = "0.15.0"
once_cell = "1.17.1"
regex = "1.8.1"
reqwest = { version = "0.11.10", features = ["json"] }
scraper = "0.16.0"
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.79"
tokio = { version = "1.28.1", features = ["full"] }
1 change: 1 addition & 0 deletions data/portishead.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/portishead_with_lyrics.json

Large diffs are not rendered by default.

1,553 changes: 1 addition & 1,552 deletions data/tinariwen.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/tinariwen_with_lyrics.json

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions scraper/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "scraper"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
once_cell = "1.17.1"
scraper = "0.16.0"
reqwest = { version = "0.11.10", features = ["json"] }
1 change: 1 addition & 0 deletions scraper/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod scraper;
File renamed without changes.
3 changes: 1 addition & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ use genius::{
genius::Genius,
model::{artist::PrimaryArtist, hit::Hit, song::ArtistSong},
};
use scraper::scraper::AppScraper;

mod args;
mod file_manager;
mod post_processor;
mod scraper;
use {
crate::scraper::AppScraper,
args::Args,
clap::Parser,
post_processor::{
Expand Down

0 comments on commit 97ba15b

Please sign in to comment.