update cron job

This commit is contained in:
MuslemRahimi 2024-12-15 23:40:13 +01:00
parent 4abd38bad9
commit 2a81b3f151
3 changed files with 8 additions and 5 deletions

View File

@ -61,7 +61,7 @@ def format_name(name):
# Join the parts to form the final name # Join the parts to form the final name
return " ".join(formatted_parts) return " ".join(formatted_parts)
def aggregate_transactions(transactions, min_value=100_000): def aggregate_transactions(transactions, min_value=100_000):
@ -111,7 +111,7 @@ def aggregate_transactions(transactions, min_value=100_000):
async def get_data(session, symbols): async def get_data(session, symbols):
res_list = [] res_list = []
for page in range(0, 20): # Adjust the number of pages as needed for page in range(0, 100): # Adjust the number of pages as needed
url = f"https://financialmodelingprep.com/stable/insider-trading/latest?page={page}&apikey={api_key}" url = f"https://financialmodelingprep.com/stable/insider-trading/latest?page={page}&apikey={api_key}"
async with session.get(url) as response: async with session.get(url) as response:
try: try:

View File

@ -157,7 +157,7 @@ def run_similar_stocks():
def run_historical_price(): def run_historical_price():
week = datetime.today().weekday() week = datetime.today().weekday()
if week <= 4: if week <= 5:
run_command(["python3", "cron_historical_price.py"]) run_command(["python3", "cron_historical_price.py"])
def run_one_day_price(): def run_one_day_price():

View File

@ -1,5 +1,8 @@
import requests import requests
from bs4 import BeautifulSoup
url = "https://api.stocktwits.com/api/2/streams/symbol/AAPL.json?filter=top" url = "https://twitter.com/search?q=%24AAPL&src=typed_query"
response = requests.get(url) response = requests.get(url)
print(response) soup = BeautifulSoup(response.content, 'html.parser')
print(soup)