Skip to content

Frolov-Andrey2405/Multisite-Parser-Bot-for-Telegram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multisite-Parser-Bot-for-Telegram

This repository contains a Telegram bot that was created using the aiogram library. The bot retrieves data from a MySQL database and publishes it in a Telegram channel.

Detailed Description

The Telegram bot in this repository was created using the aiogram library and is designed to be easily extendable for support and development. The purpose of the bot is to automate the process of publishing new addons and elements of add-ons in a Telegram channel. These publications consist of messages containing links, text, and images taken from the data stored in the MySQL database.

New data is entered into the database asynchronously using the aiomysql library and .json files. This data is then sorted and checked for similarity in order to link the Vfxmed and BlenderMarket tables.

Parsing occurs on the following websites:

Asynchronous parsing (using asyncio, httpx, and Semaphore technologies) is performed by parsing the HTML content of the sites using json, re, BeautifulSoup, requests, and lxml.

The structure of the data parsed from vfxmed.com has the following format:

{ "link": href, "title": title, "download_link": download_link }

The structure of the data parsed from blendermarket.com has the following format:

{ 'off_link': link, 'name_of_tools': name_of_tools, 'url_on_image': url_on_image, }

Technologies and Libraries

  • Python 3.x+: served a central role as the main programming language in the project
  • aiogram: a library for creating Telegram bots in Python
  • MySQL: a popular database management system
  • aiomysql: a library for accessing MySQL databases asynchronously in Python
  • json: a data interchange format that is used for storing and exchanging data
  • re(regular expressions): a library in Python for searching and manipulating strings
  • BeautifulSoup: a library for parsing HTML and XML in Python
  • requests: a library for making HTTP requests in Python
  • lxml: a library for parsing XML and HTML in Python
  • asyncio: a library for asynchronous programming in Python
  • httpx: an asynchronous HTTP library for Python
  • Semaphore: a library for controlling access to resources in Python

About

This repository contains a Telegram bot that is able to parse multiple websites for information and send it to the user through private messages. The websites currently supported are www.vfxmed.com and https://blendermarket.com/.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published