Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion finviz/main_func.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
from datetime import datetime

from lxml import etree
from cachetools import TTLCache

from finviz.helper_functions.request_functions import http_request_get
from finviz.helper_functions.scraper_functions import get_table

STOCK_URL = "https://finviz.com/quote.ashx"
NEWS_URL = "https://finviz.com/news.ashx"
CRYPTO_URL = "https://finviz.com/crypto_performance.ashx"
STOCK_PAGE = {}
STOCK_PAGE = TTLCache(maxsize=100, ttl=60*15)


def get_page(ticker):
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ user_agent~=0.1.9
cssselect~=1.1.0
tqdm~=4.61.1
tenacity~=7.0.0
cachetools~=5.0.0