Giter Club home page Giter Club logo

telegram-group-or-channel-users-to-csv's Introduction

Script to export members Telegram Groups and Channels to a CSV file and to add members to Telegram Groups or Channels.

Exporting and adding members to channels requires the user from which the script is launched to be a Channel admin.

Install dependencies

You'd need python3 and pip3 installed and available in your PATH.

Run pip3 install -r requirements.txt from the projects root directory.

Telegram Configuration

  1. To run it you need to generate API credentials for your Telegram user, you can do it here, and access your already created ones here
  2. Replace your credentials in the script
    api_id = 000000        # YOUR API_ID
    api_hash = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'        # YOUR API_HASH
    phone = '+34000000000'        # YOUR PHONE NUMBER, INCLUDING COUNTRY CODE

Export users

Just follow the instructions in the script after running it from your the shell.

Add users to groups

Users can be added using:

  • Username: Gets temporarily banned with less requests.
  • User ID: Gets temporarily banned with more requests.

Temporarily bans last for up to a day in my experience.

Adding users by Username expects a CSV file with one username per line. Adding users by User ID expects a CSV file such as: username,user_id,user_access_hash

No headers are expected in the CSV files

Once you have your CSV prepared, just follow the instructions in the script.

telegram-group-or-channel-users-to-csv's People

Contributors

gsusi avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

telegram-group-or-channel-users-to-csv's Issues

how to add user in channel

hey i like ur script but i dont known how to add users in channel after scraping

i try with option 2 but its show error

image

Options not working

Option 2 and 3 not working, please help

Traceback (most recent call last):
File "main.py", line 188, in
add_users_to_group()
File "main.py", line 25, in add_users_to_group
input_file = sys.argv[1]
IndexError: list index out of range
termuxblack >

Users from Channels not getting pulled

Hi,
The script is unable to pull users' data from the channels on which we don't have Chat Admin right. Below is the script error.

Error message >>>>>>>>
raise MultiError(exceptions, results, requests)
telethon.errors.common.MultiError: ([ChatAdminRequiredError('Chat admin privileges are required to do that in the specified chat (for example, to send a message in a channel which is not yours), or invalid permissions used for the channel or group (caused by GetParticipantsRequest)'),

Any way to circumvent this required privilege to pull users data ??

Thanks.

Problems by Showing CSV

Hello dear,
when i took option 3 after scraping members from a channel i cant show my csv. Here you can see the screenshot.
i would be very pleased about help

best regards
2020-03-25 14_25_34-VM-tgra  wird ausgeführt  - Oracle VM VirtualBox

Telegram has suspended my number

I have lost my number by running the code several times. Is it a permanent or temporary ban? If it is permanent you should delete the contribution from Github, or at least warn about this.

I can't add members

i use the command : python3 telethon-bot-add-users-to-groups.py list_of_users.csv

And add members options 2

i have this results

Capture d’écran de 2020-10-08 00-31-54

But no members added on the telegram group.

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.