News API: Extracting News Headlines and Articles

News plays an essential role in our daily life. Whether you want to create your own news website, or carry out a data analysis project, there is often a need to fetch different types of news articles or headlines to aggregate the news from different sources at one place or analyze them. Applications can be many, and fortunately, there is a way to retrieve the news articles from the web, from different sources and the same time.

In this tutorial you will learn how to extract news headlines and articles using the News API and save them to a CSV file.

Continue reading “News API: Extracting News Headlines and Articles”

Adding Telegram Group Members to Your Groups Using Telethon

In the previous Telethon tutorial you learned how to send messages to Telegram group members. Now you are going to learn how to add new members to your own group. We will read the member list from the csv file which we extracted in the previous tutorial and add them to our group.

Continue reading “Adding Telegram Group Members to Your Groups Using Telethon”

Sending Message to Telegram Members Using Telethon

In this tutorial, we are going to use the CSV file that we generated in Scraping Telegram Members tutorial to send bulk messages to our scraped Telegram group members using Telegram API and Python Telethon library. So if you did not already checked that, visit this tutorial and learn how to get this file. Basically we will feed our new Python script with that CSV file to read usernames or user IDs from it and send a message to them.

Continue reading “Sending Message to Telegram Members Using Telethon”

Scraping Telegram Group Members with Python and Telethon

Telegram is one of the best communications apps around the world. People usually use Telegram for managing their communities and promotions.

Startup companies or ongoing projects use Telegram for bringing audience attention to their products and services. Telegram Members are engaging with the community! This is what we all want. Engaged members will help to grow the community.

In this tutorial, you will learn how to use Telegram API extract group members.

Continue reading “Scraping Telegram Group Members with Python and Telethon”

Data Extraction from APIs with Python – Currency Exchange

There are several popular platforms that give developers access to their “web services”, aka “APIs” (Application Programming Interface). So using APIs is the official way for data extraction and doing other stuff allowed by such applications. You can even benefit from some APIs to build other applications. REST APIs usually generate output in JSON or XML format because most of programming languages can handle these formats easily. In fact, JSON (JavaScript Object Notation) is very similar to data types in programming languages; for example, it is very similar to Python dictionaries. If a REST API allows you to get the data you want to retrieve, then you do not need regular web scraping.

Some APIs require authentication (API Key or Client ID and Client Secret, similar to a username and password, so to speak) to control their usage, and some do not. We will explain this later in multiple APIs. For the purpose of clarifying the basics, we will start with a very simple currency rate conversion API that does not require any authentication.

In this tutorial, you will learn how to use Python to extract data from ExchangeRatesAPI.io which is -according to its official website- “a free service for current and historical foreign exchange rates published by the European Central Bank.” Continue reading “Data Extraction from APIs with Python – Currency Exchange”