mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-07 16:15:32 +02:00
eliminate additional head request
This commit is contained in:
parent
fa41633e11
commit
c198225012
3 changed files with 27 additions and 16 deletions
|
@ -18,6 +18,12 @@ pub struct Args {
|
|||
|
||||
#[derive(Subcommand)]
|
||||
pub enum Commands {
|
||||
/// Use the complete pipeline
|
||||
All {
|
||||
/// Source Url to download HTML from
|
||||
#[arg(long, value_name = "URL")]
|
||||
source_url: Option<String>,
|
||||
},
|
||||
/// Only use the Readability parser
|
||||
Readability {
|
||||
/// Source HTML file
|
||||
|
@ -32,6 +38,7 @@ pub enum Commands {
|
|||
#[arg(long, value_name = "URL")]
|
||||
source_url: Option<String>,
|
||||
},
|
||||
/// Only use (a subset of) the Ftr parser
|
||||
Ftr {
|
||||
/// Source HTML file
|
||||
#[arg(long, value_name = "FILE")]
|
||||
|
|
|
@ -31,6 +31,7 @@ async fn main() {
|
|||
.unwrap();
|
||||
|
||||
match args.command {
|
||||
Commands::All { source_url: _ } => unimplemented!(),
|
||||
Commands::Readability {
|
||||
html,
|
||||
base_url,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue