1
0
Fork 0
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:
Jan Lukas Gernert 2023-03-26 11:31:59 +02:00
parent da12fcdab6
commit 873e081c33
7 changed files with 564 additions and 492 deletions

View file

@ -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