Coder Social home page Coder Social logo

shri4r / arz-telegram-bot Goto Github PK

View Code? Open in Web Editor NEW
14.0 1.0 1.0 13 KB

ربات تلگرام دریافت نرخ ارز (قیمت دلار، پوند و یورو)

License: MIT License

Python 100.00%
crawler currency currency-exchange currency-exchange-rates foreign-exchange foreign-exchange-rates telegram-bot python

arz-telegram-bot's Introduction

Arz Telegram Bot

This is a Telegram bot that shows the current price of US Dollar, British Pound, and Euro currencies in Iranian Rial. The bot retrieves the currency prices from a website, stores them in a SQLite3 database, and displays the prices to users upon request.

Features

  • Fetches currency prices (USD, GBP, EUR) from a website
  • Stores the prices in a SQLite3 database
  • Displays the current price of each currency to users via a Telegram bot
  • Supports the following commands:
  • /start - Displays a welcome message and available commands
  • /dollar - Shows the price of US Dollar
  • /pound - Shows the price of British Pound
  • /euro - Shows the price of Euro

Prerequisites

  • Python >= 3.8
  • Required Python packages: requests, beautifulsoup4, fake_useragent, lxml, python-telegram-bot

Installation

  1. Clone the repository
  2. Activate your virtualenv
  3. Install the required packages -> pip install -r requirements.txt

Best Practice

To ensure responsible and ethical web scraping, it is recommended to follow these best practices:

  1. Ask for permission: Before scraping any website, it is important to check if the website allows web scraping. Some websites may have specific terms and conditions or may require you to obtain permission before scraping their data. It is always a good practice to respect the website's policies and seek permission if necessary.

  2. Limit the frequency: To prevent overloading the website's server and to avoid IP blocking, it is advisable to limit the frequency of scraping requests. Running the currency_crawler.py file every few minutes or at a reasonable interval helps distribute the load and reduces the chances of being blocked by the website.

By following these best practices, you can ensure that your web scraping activities are respectful, responsible, and compliant with the website's terms and conditions.

Disclaimer

Please note that the crawling of the tgju website to fetch currency prices is subject to the terms and conditions of the website. By running currency_crawler.py file, you agree that the responsibility of crawling the tgju website and complying with its terms and conditions lies solely with you. I, as the developer of this bot, am not responsible for any misuse or violation of the website's terms and conditions.

arz-telegram-bot's People

Contributors

shri4r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

iwishco

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.