Skip to main content

A Python wrapper for Yle's Comments API

Reason this release was yanked:

incorrect requirements

Project description

ylecomments v1

Python package for fetching comments from Yle Comments API

POSTing comments is not supported at this time. Support for this is unlikely.

Installation

pip install ylecomments

Example usage

from ylecomments import ylecomments

# Get comments for a specific article
# https://yle.fi/a/74-20023410
article = ylecomments.YleArticle("74-20023410")
comments = article.get_approved_comments()

# Print the first comment
print(comments[0].content)

# Print the comment author's name
print(comments[0].author)

# Print the amount of likes the comment has
print(comments[0].likes)

# Other attributes:
# rejectedAt, children, content, likes, acceptedAt, createdByModerator,
# author, topicExternalId, id, parentId, topCommentId, authenticatedAuthor,
# topicId, createdAt, createdByTrustedCommentAuthor, createdByCommentator,
# isModerationReply

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ylecomments-1.0.0.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

ylecomments-1.0.0-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page