diff --git a/data_utils.py b/data_utils.py index f4c726d..8891d84 100644 --- a/data_utils.py +++ b/data_utils.py @@ -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() diff --git a/download.py b/download.py index 38ee64a..c7de877 100644 --- a/download.py +++ b/download.py @@ -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() \ No newline at end of file