diff --git a/.env.local b/.env.local index dcdbef9..e614553 100644 --- a/.env.local +++ b/.env.local @@ -3,4 +3,5 @@ COOKIES="" USERNAME="" PASSWORD="" EMAIL="" -EMAIL_PASSWORD="" \ No newline at end of file +EMAIL_PASSWORD="" +API_SEARCH_KEY="" \ No newline at end of file diff --git a/main.py b/main.py index a7104bd..c0ba965 100644 --- a/main.py +++ b/main.py @@ -46,6 +46,7 @@ async def main(): password = os.getenv("PASSWORD") email = os.getenv("EMAIL") email_password = os.getenv("EMAIL_PASSWORD") + api_search_key = os.getenv("API_SEARCH_KEY") await api.pool.add_account(username, password, email, email_password, cookies=cookies) await api.pool.login_all() # try to login to receive account cookies @@ -55,7 +56,7 @@ async def main(): if check_if_json_exists(OUTPUT_FILE): _results = load_json(OUTPUT_FILE).get("tweets", []) - async for rep in api.search("AI"): + async for rep in api.search(api_search_key): try: _results.append(rep.json()) logger.info("Appended tweet JSON")