A simple wrapper for the Diffbot Article API.
pip install diffbot_api
from article_parser import ArticleAPI
parser = ArticleAPI(token='YOUR DIFFBOT TOKEN')
url = 'https://www.nytimes.com/2018/03/10/world/asia/china-xi-jinping-term-limit-explainer.html?&moduleDetail=section-news-1&action=click&contentCollection=Asia%20Pacific®ion=Footer&module=MoreInSection&version=WhatsNext&contentID=WhatsNext&pgtype=article'
article = parser.parse(url)
print(article.title)
>> 'Ending Term Limits for China’s Xi Is a Big Deal. Here’s Why.'
pageUrl
: the normalized url of the articledate
: the date of the articleauthor
: the author(s) of the articlesiteName
: the name of the site the article is fromvideos
: any videos contained in the articletitle
: the title of the articlehtml
: the normalized html of the articletext
: the text content of the articletags
: the tags associated with the articlepublisherCountry
: the country the article is from