mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-08 08:30:00 +02:00
clean js-links & add new test
This commit is contained in:
parent
da12fcdab6
commit
873e081c33
7 changed files with 564 additions and 492 deletions
|
@ -21,7 +21,7 @@ async fn run_test(name: &str) {
|
|||
let document = crate::FullTextParser::parse_html(&html, None, &empty_config).unwrap();
|
||||
let xpath_ctx = crate::FullTextParser::get_xpath_ctx(&document).unwrap();
|
||||
|
||||
crate::FullTextParser::prep_content(&xpath_ctx, None, &empty_config, &url);
|
||||
crate::FullTextParser::prep_content(&xpath_ctx, None, &empty_config, &url, &document);
|
||||
let mut article = Article {
|
||||
title: None,
|
||||
author: None,
|
||||
|
@ -252,6 +252,11 @@ async fn ietf_1() {
|
|||
run_test("ietf-1").await
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn js_link_replacement() {
|
||||
run_test("js-link-replacement").await
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn webmd_1() {
|
||||
run_test("webmd-1").await
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue