Skip to content

Instantly share code, notes, and snippets.

@weeping-angel
Last active March 4, 2024 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weeping-angel/72a58e9bc6b969a7d8053d624715790f to your computer and use it in GitHub Desktop.
Save weeping-angel/72a58e9bc6b969a7d8053d624715790f to your computer and use it in GitHub Desktop.
[Get TopFeeds] Code to get TopFeed Articles from Medium. #python #medium_api #medium_api_py
# Import libraries
import os
from medium_api import Medium
# Get RAPIDAPI_KEY from the environment
api_key = os.getenv('RAPIDAPI_KEY')
# Create a `Medium` Object
medium = Medium(api_key)
# Create a "TopFeeds" Object with tag="data-science" and mode="new"
topfeeds = medium.topfeeds(
tag = "data-science",
mode = "new"
)
# Fetch all the articles information
topfeeds.fetch_articles()
# Iterate over topfeeds articles and print their title
for article in topfeeds.articles:
print(article.title)
# Import libraries
import os
from medium_api import Medium
# Get RAPIDAPI_KEY from the environment
api_key = os.getenv('RAPIDAPI_KEY')
# Create a `Medium` Object
medium = Medium(api_key)
# Create a "TopFeeds" Object with tag="data-science" and mode="new"
topfeeds = medium.topfeeds(
tag = "data-science",
mode = "new"
)
# Fetch all the articles information
topfeeds.fetch_articles()
# Iterate over topfeeds articles and print their title
for article in topfeeds.articles:
print(article.title)
The Hidden Cost of Generative AI: A Spotlight on Environmental Impact
Launching “ML & AI Cupcakes”
Empowering Women in Tech: Women Techmakers Algiers’ Journey with DataCamp
Logical Retrieval with Knowledge Graphs: The Key to Contextual and Intelligent Information Seeking
Unlocking Business Potential with Data Science: Why You Can’t Afford to Miss Out
Starting a career in Data Analytics
NumPy Magic: Enhancing Data Science & Data Analysis in Python
Python Sets And Tuples: A Comprehensive Beginner’s Guide with 10 Examples
Cloning Yourself on WhatsApp with AI in Python
Synthetic Intelligence
LoRA-the-Explorer: Pre-training LLMs from Scratch with LoRA
Weekly AI and NLP News — March 4th 2024
Data Pre-processing for Zillow House Prediction Model Using Python.
Data Analysis: Unicorn Companies
Understanding fit, fit_transform, and transform in Machine Learning
Feature Selection…
Make the right choice in Python
Prospects of Data Science: Career Opportunities, Employment, and Skillsets
Args and Kwargs in Python
10 Advanced Python Features I Can’t Live Without (And Neither Should You)
Classification Model Evaluation Metrics
Dive into Delightful Queues with AWS SQS!
What initiatives are in place to promote sustainability and environmental responsibility within the…
How To Avoid Peaking In University
How to create your first dash app (Python)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment