diff --git a/alaltalk/settings.py b/alaltalk/settings.py index f510762..ee249d6 100644 --- a/alaltalk/settings.py +++ b/alaltalk/settings.py @@ -23,7 +23,7 @@ SECRET_KEY = "django-insecure-*qdqs)r29%v^7$+euwdg_p2-g2fs-9w2tl)egk=4i#872*m*%9" # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = False +DEBUG = True ALLOWED_HOSTS = ["*"] @@ -177,20 +177,20 @@ # # # AWS S3 connet -DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage" -STATICFILES_STORAGE = "storages.backends.s3boto3.S3Boto3Storage" - - -with open(os.path.join(BASE_DIR, "alaltalk/config/aws.json")) as f: - secret = json.loads(f.read()) - -AWS_ACCESS_KEY_ID = secret["AWS"]["ACCESS_KEY_ID"] -AWS_SECRET_ACCESS_KEY = secret["AWS"]["SECRET_ACCESS_KEY"] -AWS_STORAGE_BUCKET_NAME = secret["AWS"]["STORAGE_BUCKET_NAME"] -AWS_REGION = "ap-northeast-2" -AWS_DEFAULT_ACL = "public-read" -AWS_S3_CUSTOM_DOMAIN = "%s.s3.%s.amazonaws.com" % (AWS_STORAGE_BUCKET_NAME, AWS_REGION) - +# DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage" +# STATICFILES_STORAGE = "storages.backends.s3boto3.S3Boto3Storage" +# +# +# with open(os.path.join(BASE_DIR, "alaltalk/config/aws.json")) as f: +# secret = json.loads(f.read()) +# +# AWS_ACCESS_KEY_ID = secret["AWS"]["ACCESS_KEY_ID"] +# AWS_SECRET_ACCESS_KEY = secret["AWS"]["SECRET_ACCESS_KEY"] +# AWS_STORAGE_BUCKET_NAME = secret["AWS"]["STORAGE_BUCKET_NAME"] +# AWS_REGION = "ap-northeast-2" +# AWS_DEFAULT_ACL = "public-read" +# AWS_S3_CUSTOM_DOMAIN = "%s.s3.%s.amazonaws.com" % (AWS_STORAGE_BUCKET_NAME, AWS_REGION) +# # MySQL Configuration diff --git a/requirements.txt b/requirements.txt index 49ae6e0..0663ffe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -72,12 +72,9 @@ sortedcontainers==2.4.0 soupsieve==2.3.1 sqlparse==0.4.2 supervisor==4.2.4 -toml==0.10.2 -tomli==2.0.1 trio==0.20.0 trio-websocket==0.9.2 Twisted==22.2.0 -twisted-iocpsupport==1.0.2 txaio==22.2.1 types-PyMySQL==1.0.6 types-pytz==2021.3.6 diff --git a/search/functions.py b/search/functions.py index 8527024..f9f24bc 100644 --- a/search/functions.py +++ b/search/functions.py @@ -23,7 +23,7 @@ def crawling_youtube(search_word: str, content_count: int) -> List[List[str]]: options.add_argument("headless") options.add_argument("--incognito") - driver = webdriver.Chrome(executable_path='/usr/local/bin/chromedriver', options=options) + driver = webdriver.Chrome(executable_path=webdriver_path, options=options) # 쿠기 삭제 driver.delete_all_cookies() @@ -63,6 +63,7 @@ def crawling_youtube(search_word: str, content_count: int) -> List[List[str]]: crawling_data.append([crawling_url, youtube_base_url + video_url, video_title, video_views, video_already]) print("youtube crawling function time is ", time.time() - start, "seconds") + driver.close() return crawling_data[0:content_count] diff --git a/search/service/search_service.py b/search/service/search_service.py index d8a72ae..461b325 100644 --- a/search/service/search_service.py +++ b/search/service/search_service.py @@ -57,11 +57,6 @@ def crawling_book(search: str) -> List[List[str]]: search_list = soup.select("#search_list tr") answer = [] - # for row in search_list: - # print('#####################') - # print(row) - # print(row.select_one('detail')) - for i in range(len(author)): test_title = [] test_title.append(title[i].get_text()) diff --git a/static/js/search/recommend.js b/static/js/search/recommend.js index 45acdce..af9da75 100644 --- a/static/js/search/recommend.js +++ b/static/js/search/recommend.js @@ -11,7 +11,7 @@ function click_recommend_function() { get_chat_log() // 2. 키워드 추출 하기 ( KeyWordAPI 로 ajax 전송 ) get_keyword(chat_log) - + console.log('recommend_toggle!! -> ', document.getElementById('recommend_toggle')) }