Skip to content

Commit

Permalink
update cron job
Browse files Browse the repository at this point in the history
  • Loading branch information
MuslemRahimi committed Dec 15, 2024
1 parent 4abd38b commit 2a81b3f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/cron_insider_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def format_name(name):

# Join the parts to form the final name
return " ".join(formatted_parts)


def aggregate_transactions(transactions, min_value=100_000):

Expand Down Expand Up @@ -111,7 +111,7 @@ def aggregate_transactions(transactions, min_value=100_000):

async def get_data(session, symbols):
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}"
async with session.get(url) as response:
try:
Expand Down
2 changes: 1 addition & 1 deletion app/primary_cron_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def run_similar_stocks():

def run_historical_price():
week = datetime.today().weekday()
if week <= 4:
if week <= 5:
run_command(["python3", "cron_historical_price.py"])

def run_one_day_price():
Expand Down
7 changes: 5 additions & 2 deletions app/test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
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)
print(response)
soup = BeautifulSoup(response.content, 'html.parser')

print(soup)

0 comments on commit 2a81b3f

Please sign in to comment.