naver크롤링 && wp api를 이용한 임시글 등록구현
This commit is contained in:
@ -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:
|
||||
|
@ -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="파이썬 자동 포스팅"):
|
||||
|
Reference in New Issue
Block a user