Skip to main content

A Python wrapper for Yle's Comments API

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.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

ylecomments-1.0.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file ylecomments-1.0.1.tar.gz.

File metadata

  • Download URL: ylecomments-1.0.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for ylecomments-1.0.1.tar.gz
Algorithm Hash digest
SHA256 fd524c2de9cd76a1d3b7a276af71109a953937d42b72b55234765cd4fd1763f2
MD5 4f3fe53f5ce7c727fe38a79714715f49
BLAKE2b-256 b05017282c13231640d3c7730ff7e2ce9a3ff093cf07bc6e206ef34b4542ab71

See more details on using hashes here.

File details

Details for the file ylecomments-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ylecomments-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for ylecomments-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 59ad148a2715ff00dd76fd478083ce9450366ea7aea65e877d41f508ff18478f
MD5 5473339aa6b70103e199dbe42957a369
BLAKE2b-256 72059a85dda4f595b5201b3c239e120c4d3955975e87fcfadede9c9e093bfb11

See more details on using hashes here.

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