mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-31 22:35:36 +00:00
Use app.run() in the examples
This commit is contained in:
@@ -33,15 +33,14 @@ as some user names may not contain ascii letters at all.
|
||||
"""
|
||||
|
||||
app = Client("my_account")
|
||||
app.start()
|
||||
|
||||
target = "pyrogramchat" # Target channel/supergroup username or id
|
||||
users = {} # To ensure uniqueness, users will be stored in a dictionary with user_id as key
|
||||
limit = 200 # Amount of users to retrieve for each API call (200 is the maximum)
|
||||
|
||||
# "" + "0123456789" + "abcdefghijklmnopqrstuvwxyz" (as list)
|
||||
queries = [""] + [str(i) for i in range(10)] + list(ascii_lowercase)
|
||||
|
||||
app.start()
|
||||
|
||||
for q in queries:
|
||||
print("Searching for '{}'".format(q))
|
||||
offset = 0 # For each query, offset restarts from 0
|
||||
|
Reference in New Issue
Block a user