naver크롤링 && wp api를 이용한 임시글 등록구현

This commit is contained in:
2025-01-19 23:58:30 +09:00
parent da51f38e3c
commit 084f46edd9
10 changed files with 164 additions and 13 deletions

View File

@ -3,10 +3,13 @@ from dotenv import load_dotenv
# 우선순위: .env.prd > .env.dev > .env
if os.path.exists('.env.prd'):
print("Read ::: .env.prd")
load_dotenv('.env.prd')
elif os.path.exists('.env.dev'):
print("Read ::: .env.dev")
load_dotenv('.env.dev')
else:
print("Read ::: .env")
load_dotenv('.env') # 기본 .env 파일
class GetConfig:

View File

@ -29,7 +29,6 @@ class WordPress():
def __init__(self, dict):
self.wp_url = dict['wp_url']
self.wp_user = dict['wp_user']
self.wp_user = dict['wp_user']
self.wp_api_key = dict['wp_api_key']
def create_post(self, category_id, content, media_id = None, status = "draft", title="파이썬 자동 포스팅"):