Git Product home page Git Product logo

telegrammassdmbot's Introduction

TeleGram Scraper and SMS Bot

This project consists of three scripts: setup.py, scraper.py, and smsbot.py, which serve different purposes for Telegram scraping and sending SMS messages to Telegram users.

Setup

  1. Install Python 3 if you haven't already. You can download it from the official website: https://www.python.org/downloads/

  2. Clone or download this repository to your local machine.

  3. Navigate to the project directory.

  4. Install the required dependencies by running the setup script:

    python3 setup.py --install
    
  5. Setup your Telegram API credentials by running the configuration script:

    python3 setup.py --config
    

    Follow the prompts to enter your API ID, API Hash, and phone number. If you don't have API credentials yet, you can create them at https://my.telegram.org/apps.

Scraping Active Members

  1. Make sure you have completed the setup steps mentioned above.

  2. Run the scraper script and select the groups you want to scrape active members from:

    python3 scraper.py
    

    Follow the on-screen instructions to select the groups. Active members from the selected groups will be saved in a customized file name with .csv.

Sending SMS Messages

  1. Make sure you have completed the setup steps mentioned above.

  2. Prepare a CSV file with the list of users to whom you want to send SMS messages. The file should have the following format:

    username,user id,access hash,name,group,group id
    
  3. Run the SMS bot script and provide the CSV file as input:

    python smsbot.py file.csv
    

    Follow the on-screen instructions to select the mode (by User ID or Username) and enter your message. The bot will send the message to each user in the CSV file.

Important Notes

  • Be cautious while using the SMS bot. Sending messages too frequently might result in Telegram blocking your account for a certain period (Flood Error). Always use the SLEEP_TIME variable to add a delay between messages to avoid such issues.

  • The scraping script considers users active if they have been online in the last 30 days. You can modify the is_active function in scraper.py to adjust this threshold if needed.

  • Before using the SMS bot, ensure you have permission to contact the users you are sending messages to. Spamming or sending unsolicited messages may violate Telegram's terms of service and can lead to account restrictions.

Disclaimer

This project is intended for educational and research purposes only. The authors are not responsible for any misuse or illegal activities done with the tool.

telegrammassdmbot's People

Contributors

just337ine avatar

Watchers

 avatar

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.