wersas1 / tcrawl
scrapping all data and information public channels telegram & create object from scrapping with template
dev-master
2023-06-27 14:10 UTC
Requires
- php: >=8.0.2
- fabpot/goutte: >=4.0
- guzzlehttp/guzzle: >=7.5
- laravel/framework: >=8.0
This package is not auto-updated.
Last update: 2024-05-01 12:54:47 UTC
README
Telegram Scrapping
requirements
- PHP v7.2 or above
- Laravel v5.5 or above
Installation
composer require mfarahani/tcrawl
Documentation
Baseic
find information and last message from public channel telegram
$tCrawl = new TCrawler();
$tCrawl->setProxy("http://username:password@host:port");
$tCrawl->setChannel("channelname telegram");
$info = $tCrawl->crawler()->getInfo();
$formWithTemplate = false; //you can use 'true' or 'false' for generate template
$lastMessgae = $tCrawl->crawler()->getLastMessage($formWithTemplate);
$latestMessages = $tCrawl->crawler()->getLatestMessages($formWithTemplate, $fromId);
dump($info , $lastMessgae , $latestMessages );
Create Template output
you can set template and generate message with your template
- Specify your template by inserting it between the [[***]]
example template :
$template = "phone number is : [[phone]] , name : [[name]]"
$tCrawl = new TCrawler();
$tCrawl->setProxy("http://username:password@host:port");
$tCrawl->setChannel("channelname telegram");
$info = $tCrawl->crawler()->getInfo();
$tCrawl->templateBuilder()->createTemplate($info, $template);
$tCrawl->templateBuilder()->updateTemplate("channelname telegram", $template , $status);
$tCrawl->templateBuilder()->getTemplate("channelname telegram");
$tCrawl->templateBuilder()->build($username, $message);
Contributing
Thank you for considering contributing to the TC Package!
License
The Laravel framework is open-source software licensed under the MIT license.