Last active
March 4, 2024 13:27
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import libraries | |
import os | |
from medium_api import Medium |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get RAPIDAPI_KEY from the environment | |
api_key = os.getenv('RAPIDAPI_KEY') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a `Medium` Object | |
medium = Medium(api_key) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Iterate over topfeeds articles and print their title | |
for article in topfeeds.articles: | |
print(article.title) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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