autoextract_poet.items.Article¶
- class Article(url: Optional[str] = None, probability: Optional[float] = None, headline: Optional[str] = None, datePublished: Optional[str] = None, datePublishedRaw: Optional[str] = None, dateModified: Optional[str] = None, dateModifiedRaw: Optional[str] = None, author: Optional[str] = None, authorsList: List[str] = NOTHING, inLanguage: Optional[str] = None, breadcrumbs: List[autoextract_poet.items.Breadcrumb] = NOTHING, mainImage: Optional[str] = None, images: List[str] = NOTHING, description: Optional[str] = None, articleBody: Optional[str] = None, articleBodyHtml: Optional[str] = None, articleBodyRaw: Optional[str] = None, videoUrls: List[str] = NOTHING, audioUrls: List[str] = NOTHING, canonicalUrl: Optional[str] = None)[source]¶
Bases:
autoextract_poet.items.Item
- __init__(url: Optional[str] = None, probability: Optional[float] = None, headline: Optional[str] = None, datePublished: Optional[str] = None, datePublishedRaw: Optional[str] = None, dateModified: Optional[str] = None, dateModifiedRaw: Optional[str] = None, author: Optional[str] = None, authorsList: List[str] = NOTHING, inLanguage: Optional[str] = None, breadcrumbs: List[autoextract_poet.items.Breadcrumb] = NOTHING, mainImage: Optional[str] = None, images: List[str] = NOTHING, description: Optional[str] = None, articleBody: Optional[str] = None, articleBodyHtml: Optional[str] = None, articleBodyRaw: Optional[str] = None, videoUrls: List[str] = NOTHING, audioUrls: List[str] = NOTHING, canonicalUrl: Optional[str] = None) None ¶
Method generated by attrs for class Article.
Methods
__init__
([url, probability, headline, ...])Method generated by attrs for class Article.
from_dict
(item)Read an item from a dictionary.
from_list
(items)Read items from a list, invoking
from_dict
for each item in the listAttributes
url
probability
headline
datePublished
datePublishedRaw
dateModified
dateModifiedRaw
author
authorsList
inLanguage
breadcrumbs
mainImage
images
description
articleBody
articleBodyHtml
articleBodyRaw
videoUrls
audioUrls
canonicalUrl
- classmethod from_dict(item: Optional[Dict])[source]¶
Read an item from a dictionary.
Unknown attributes are kept in the dict
_unknown_fields_dict
so thatAutoExtractAdapter
can include them in the resultant item. This ensures supporting new AutoExtract fields even if the item library is not in sync.