gsusI / Telegram-Group-or-Channel-users-to-CSV

Given a user with credentials, this script grabs all the groups and channels for the given user, allows you to select one, and exports all users into a CSV file within the same directory. It also gives the option to add users to your groups or channels.
49 stars 48 forks source link

major refactor #6

Open shinenelson opened 3 years ago

shinenelson commented 3 years ago

I have refactored this script in a non-breaking way. I found this other repository that has multiple scripts that takes code from this script and has optimized it to have some extra features like resume capabilities.

I wanted to back-port the resuming feature, but ended up refactoring pretty much the entire script. My initial intention was to only bring in whatever extra code that was in the scrapper_and_adder script. But now the script looks nowhere like what the other one looks like. The only function that I haven't touched is printCSV() ( apart from minor compatibility changes ). I couldn't find its place and am confused why it even exists in the script.

Summary :

PS : The reason why the files don't show line-by-line changes is because the files had CRLF line-endings which I reset to LF. Navigating that changes by commit will show the changes line-by-line. After all, one should navigate each commit in a refactor one-by-one. I believe I have maintained proper contexts and written good messages in my commits.