download: documentation fix

This commit is contained in:
Nick Ninov
2026-03-02 10:59:05 +00:00
parent bf1853980f
commit 262163e2b6
2 changed files with 8 additions and 2 deletions
+2 -2
View File
@@ -147,10 +147,10 @@ def save_messages(
Params:
- `chat_id` - the chat id that will be scraped
- `folder` - where the batched data will be saved
- `pagination` - how many results to get per `.chat_messages` call
- `batch_size` - the number of messages that will be turned into a batch
- `start_timestamp` - the start extraction timestamp. Messages before this timestamp will be ignored.
- `end_timestamp` - the end extraction timestamp. Messages after this timestamp will be ignored.
- `pagination` - how many results to get per `.chat_messages` call
- `batch_size` - the number of messages that will be turned into a batch
"""
def save_batch(messages: list[str], folder: str):
timestamp = datetime.datetime.now().timestamp()
+6
View File
@@ -20,6 +20,12 @@ if __name__ == "__main__":
pickle.dump(community, f)
for channel in community["channels"]:
params = {
"backend": backend,
"chat_id": channel["chat_id"],
"folder": message_folder,
"community_info": channel
}
data_utils.save_messages(backend, channel["chat_id"], message_folder, channel)
backend.logout()