News Article
Fetch the full content of a news article from vlr.gg.
news.article() fetches the full body content of a single news article from vlr.gg. The body is returned both as plain text (content) and as a Markdown conversion (content_md) that preserves headings, nested lists, tables, links, verbatim code, emphasis, and clip embeds. date is returned as a timezone-aware UTC datetime.
If the article ID does not exist on vlr.gg, a NotFoundError is raised (vlr.gg returns a generic page for unknown IDs, so this is detected from the page content).
Signature
news.article(
article_id: int,
) -> NewsArticleParameters
Prop
Type
Returns - NewsArticle
Prop
Type
Examples
Fetch an article
import vlrdevapi
article = vlrdevapi.news.article(734100)
print(f"{article.title}")
print(f"By {article.author} on {article.date}")
print(f"Event: {article.event_name}")
print(article.content)Read the article as Markdown
import vlrdevapi
article = vlrdevapi.news.article(734100)
print(article.content_md)Read an article found in the news list
import vlrdevapi
page = vlrdevapi.news(page=1)
article_id = page.news[0].id
article = vlrdevapi.news.article(article_id)
print(article.title)Last updated on