add single page html to md
This commit is contained in:
+11
@@ -30,6 +30,12 @@ struct Args {
|
||||
#[arg(help = "Starting URL to scrape")]
|
||||
start_url: String,
|
||||
|
||||
#[arg(
|
||||
long,
|
||||
help = "Only scrape the single page at START_URL, do not crawl for links"
|
||||
)]
|
||||
single: bool,
|
||||
|
||||
#[arg(long, help = "Save documents as-is, skip Markdown conversion")]
|
||||
no_doc_conversion: bool,
|
||||
|
||||
@@ -128,6 +134,10 @@ async fn main() -> Result<()> {
|
||||
"Document conversion: {}",
|
||||
if convert_docs { "enabled" } else { "disabled" }
|
||||
);
|
||||
log::info!(
|
||||
"Single page mode: {}",
|
||||
if args.single { "enabled" } else { "disabled" }
|
||||
);
|
||||
|
||||
match (&include_types, &exclude_types) {
|
||||
(Some(t), _) => log::info!("Type filter: include {:?}", t),
|
||||
@@ -160,6 +170,7 @@ async fn main() -> Result<()> {
|
||||
include_types,
|
||||
exclude_types,
|
||||
scope_path,
|
||||
args.single,
|
||||
);
|
||||
let (count, errors) = scraper.run(&url).await;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user