mirror of
https://github.com/status-im/status-python-sdk.git
synced 2026-08-30 21:51:14 +00:00
download: documentation fix
This commit is contained in:
+2
-2
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
Reference in New Issue
Block a user