Skip to content

ail-project/ail-feeder-telegram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ail-feeder-telegram

External telegram feeder for AIL framework (with an automated user account)

  • Forum channels
  • Replies Threads
  • Images Download
  • Users + channels meta and profile picture
  • Files download (Saved on disk)

Install

  • Install python3 dependencies:
pip3 install -U -r requirements.txt
  • Copy config file:
cp etc/conf.cfg.sample etc/conf.cfg

Configuration

Add your telegram account in etc/conf.cfg:

  • Login in with your telegram phone number
  • Click under API Development tools.
  • Create new application
  • Fill App title and Short name in your application details
  • Create application and retrieve your API ID and Hash
  • Add your API ID and Hash in etc/conf.cfg

⚠️ Telegram API hash is secret and can't be revoked ⚠️
You can use this API ID and hash with any phone number or even for bot accounts

Usage

feeder.py

  • chats ( List all joined chats_ )
  • join ( Join a chat by its name or invite hash )
    • --name [Chat name] ( chat name/username )
    • --invite [Invite Hash] ( chat invite hash )
  • leave [Channel] ( Leave a Chat )
  • check [Invite Hash] ( Check an invite hash/chat without joining )
  • messages [Chat ID/username] ( Get all messages from a chat )
    • --min_id [Message ID] ( Filter: Message Minimal ID )
    • --max_id [Message ID] ( Filter: Message Maximum ID )
    • --replies ( Get replies )
    • --mark_as_read ( Mark messages as read )
    • --media ( Download medias )
    • --save_dir ( Directory to save downloaded medias )
  • message [Chat ID/username] [Message ID] ( Get a message from a chat )
    • --replies ( Get replies )
    • --mark_as_read ( Mark message as read )
    • --media ( Download medias )
    • --save_dir ( Directory to save downloaded medias )
  • monitor ( Monitor all joined chats )
  • unread ( Get all unread messages from all chats and mark them as read )
  • chat [Chat ID/username] ( Get a chat metadata, list of users/admins, ... )
    • --users ( Get a list of all the users of a chat )
    • --admins ( Get a list of all the admin users of a chat )
    • --similar ( Get a list of similar/recommended chats )
  • entity [Entity ID/username] ( Get chat or user metadata )
  • search [to_search] ( Search for public Chats/Users )

Joining Channels

python3 bin/feeder.py join -n CHANNEL_USERNAME 
python3 bin/feeder.py join -i INVITE_HASH 

Channels can also be joined from the mobile application on Apple or Android. Once the script is re-run, the newly joined channel will be added to the messages queue.

Leaving Channels

python3 bin/feeder.py leave CHANNEL_USERNAME/CHANNEL_ID 

Channels can also be left from the mobile application on Apple or Android. If you leave a channel whilst the script is running there will likely be an exception error.

Get all Channels

python3 bin/feeder.py chats 

Running this action will export a python list of channel IDs your Telegram account has joined.

If you join too many channels, too quickly, you might experience a waiting period before you can join a new one.

Get Channel Messages

python3 bin/feeder.py messages CHANNEL_USERNAME/CHANNEL_ID

MONITOR Messages from all Joined Channels

python3 bin/feeder.py monitor

About

External telegram feeder for AIL framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages