15
15
16
16
# DEBUG=true cli.py analyze --names '["pdco", "paypal", "johnson&johnson", "mcdonalds", "pepsi", "uniper", "palantir"]'
17
17
class GuruFocusCLI (Named , JsonFileWriter ):
18
- def __init__ (self , name : Optional [str ] = None , names : Optional [List [str ]] = None , filename : Optional [str ] = None ):
18
+ def __init__ (
19
+ self ,
20
+ name : Optional [str ] = None ,
21
+ names : Optional [List [str ]] = None ,
22
+ filename : Optional [str ] = None ,
23
+ ):
19
24
Named .__init__ (self , name = name , names = names )
20
25
if filename is None :
21
26
filename = GURUFOCUS_DOWNLOADS_PATH / "gurufocus.json"
@@ -34,18 +39,7 @@ def analyze(self):
34
39
35
40
gf_analyzer = GurufocusAnalyzer (self .json_file_writer )
36
41
gf_analyzer .run (items = urls , data = {})
37
- # for url in urls:
38
- # LOGGER.info(f"Scraping {url}")
39
- # download_html(url, filename="gurufocus_page.html")
40
- # html_file_path = "gurufocus_page.html"
41
- # stock_info = extract_stock_info(html_file_path)
42
- # if os.path.exists(html_file_path):
43
- # os.remove(html_file_path)
44
- # if not stock_info:
45
- # LOGGER.error(f"Failed to extract stock info from {url}")
46
- # continue
47
- # LOGGER.info(stock_info)
48
- # time.sleep(0.1)
42
+
49
43
50
44
if __name__ == "__main__" :
51
45
fire .Fire (GuruFocusCLI )
0 commit comments