From 6fb97ac894c38fe4c08c8187a5a2275c69384ac9 Mon Sep 17 00:00:00 2001 From: monoid Date: Sat, 22 Jul 2023 16:10:53 +0900 Subject: [PATCH] remove useless comment --- stock_price.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/stock_price.py b/stock_price.py index 0fa7e3c..bb75202 100644 --- a/stock_price.py +++ b/stock_price.py @@ -7,10 +7,8 @@ import sqlite3 import datetime def get_naver_finance_price(code,page=1): - #url = (f'https://finance.naver.com/item/sise_day.nhn?code={code}&page={page}') url = 'https://finance.naver.com/item/sise_day.nhn' headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"} - # print(url) html = requests.get(url,params={'code':code,'page':page},headers=headers) if html.status_code != 200: raise UserWarning(html.status_code) @@ -52,7 +50,6 @@ def croll_naver_page(code,page,date): def croll_naver_page_all(code,date) -> pd.DataFrame: html_text = get_naver_finance_price(code) - #print(html_text) s = bs4.BeautifulSoup(html_text,'html.parser') last = int(get_last_page(s)) r = [(code,i) for i in range(1,last+1)] @@ -66,9 +63,6 @@ def croll_naver_page_all(code,date) -> pd.DataFrame: if len(retdata) == 0: return [] return pd.concat(retdata,ignore_index=True) - #with mp.Pool(CPU_COUNT) as pl: - # dl = pl.starmap(croll_naver_page,r) - # return pd.concat(dl,ignore_index=True) def toSqlPos(x,code): return (code,x["날짜"],x["종가"],x["전일비"],x["시가"],x["고가"],x["저가"],x["거래량"])