Examples
Soupstars includes various examples that you can reference or use directly.
NYTimes
Extract article links and article metadata from nytimes.com
-
class
soupstars.examples.nytimes.
NytimesArticleParser
(url)[source]
Parse attributes from a NY times article.
>>> from soupstars.examples.nytimes import NytimesArticleParser
-
title
()[source]
The title of the article.
-
author
()[source]
The author(s) of the article.
-
class
soupstars.examples.nytimes.
NytimesLinkParser
(url)[source]
Parse the links from a NY times webpage.
Parameters: | url (str) – The webpage to parse |
>>> from soupstars.examples.nytimes import NytimesLinkParser
-
article_links
()[source]
A list of links that point to NYTimes articles
-
non_article_links
()[source]
A list of links that points to NYTimes pages that are not articles.