Function article_date_extractor::extract_date::extract_article_published_date [] [src]

pub fn extract_article_published_date(
    link: &str,
    html: &str
) -> Result<NaiveDate, Error>

This function attempts to extract the article date by using several different methods in a row. The following methods are used: extracting the date from url, JSON-LD, meta tags, additional html tags.

Supported date formats:

"%A, %B %e, %Y"

"%Y-%m-%dT%H:%M:%S%:z"

"/%Y/%m/%d/"

"/%Y/%d/%m/"

"%Y-%m-%d"

"%B %e, %Y"

"%Y-%m-%d %H:%M:%S"

"%Y-%m-%dT%H:%M:%SZ"

"%B %k, %Y, %H:%M %p"

"%Y-%m-%d %H:%M:%S.000000"