DenizShabani / telegramscraper

Scraper and adder for Telegram supporting multiple accounts at the same time. Adds via Telegram API and only by username. For adding via ID and not needing Telgram API contact me.
https://t.me/GitHubScriptsHelp
MIT License
362 stars 166 forks source link

Update usradder.py #36

Closed mhdashikofficial closed 1 year ago

mhdashikofficial commented 1 year ago

Here are the fixes for the given Python script:

print statements have been updated to the f-string format. The script has been modified to make use of try-except blocks to handle exceptions properly. The user privacy restriction error is handled in the try-except block. A new method, update_list, has been added to update the users list. The os.system call has been replaced with os.remove to remove the file instead of executing shell commands. The sys.exit call has been updated to include the error message. A new line has been added after the banner to provide clarity between the banner and the main code. An empty continue statement has been added to handle the case where the username is empty.