네이버 블로그 자동 포스팅 6번째 코드 입니다. 5번째 코드와 같은 모듈에 저장되는 파일 입니다. 블로그 페이지로 이동해서 자동 포스팅 해주는 함수 입니다.
‘본인 블로그 주소’ 라고 써 있는 부분에 본인 블로그 주소를 넣어 줍니다.
이후에는 순서에 따라서 크롬에서 자동으로 클릭하고 내용으로 넣어 줍니다.
#blog posting
##########################################################################################
def blog_posting(browser,topic,blog_title_kr,blog_main_kr,blog_hash_kr):
blog_write ='본인 블로그 주소'
browser.get(blog_write) #blog post로 이동
time.sleep(2)
#이전글 있는지 체크후 닫기
ex_write ='/html/body/div[1]/div/div[3]/div/div/div[1]/div/div[4]/div[2]/div[3]/button[1]'
try:
if browser.find_element('xpath',ex_write).is_displayed():
browser.find_element('xpath',ex_write).click()
except:
pass
time.sleep(1)
#도움말 있는지 체크후 닫기
help_close = '/html/body/div[1]/div/div[3]/div/div/div[1]/div/div[1]/article/div/header/button'
try:
if browser.find_element('xpath',help_close).is_displayed():
browser.find_element('xpath',help_close).click()
except:
pass
# 제목 부분 클릭
title_xpath ='/html/body/div[1]/div/div[3]/div/div/div[1]/div/div[1]/div[2]/section/article/div[1]/div[1]/div/div/p'
browser.find_element('xpath',title_xpath).click()
time.sleep(1)
ActionChains(browser).send_keys(blog_title_kr).perform()
time.sleep(1)
# 본문 부분 클릭
main_xpath = '/html/body/div[1]/div/div[3]/div/div/div[1]/div/div[1]/div[2]/section/article/div[2]/div/div'
browser.find_element('xpath',main_xpath).click()
#그림 삽입
im_url = un.image_url(topic)
get_image(im_url)
filepath = 'temp.jpg'
image = Image.open(filepath)
output = BytesIO()
image.convert("RGB").save(output, "BMP")
data = output.getvalue()[14:]
output.close()
send_to_clipboard(win32clipboard.CF_DIB, data)
time.sleep(3)
pyautogui.hotkey('ctrl', 'v')
time.sleep(2)
#블로그 메인 글을 포스팅 합니다. chatGPT에서 받아온 내용이 blog_main_kr 변수에 저장 되어 있야 합니다.
ActionChains(browser).send_keys(blog_main_kr).perform()
#블로그 해시태그를 달아줍니다. 이것도 chatGPT 에서 받아온 내용이 blog_hash_kr함수에 저장되어 있어야 합니다.
ActionChains(browser).send_keys('\n\n\n'+ blog_hash_kr).perform()
time.sleep(random.randint(150,240)) #가장 최근 수정 랜덤하게 대기
# 발행 부분 클릭
post_xpath = '/html/body/div[1]/div/div[1]/div/div[3]/div[3]/button/span'
browser.find_element('xpath',post_xpath).click()
# 발행 부분 클릭2
time.sleep(1)
post_xpath2 = '/html/body/div[1]/div/div[1]/div/div[3]/div[3]/div/div/div/div[8]/div/button'
browser.find_element('xpath',post_xpath2).click()
#####################################################################################################################
아래 포스팅 함수의 구조를 보면, browser, topic, blog_title_kr, blog_main_kr, blog_hash_kr 이렇게 5개의 변수를 받아서 입력을 해주는 구조 입니다.
browser는 셀리니움에서 자동화 하는 크롬드라이버의 클래스를 받아 오고 나머지는 변수 이름에서 유추 할 수 있듯이 블로그의 제목, 메인 내용, 해시태그를 받아 옵니다.
def blog_posting(browser,topic,blog_title_kr,blog_main_kr,blog_hash_kr):
여기 모듈까지 만들었으면 일단 영어로 된 블로그 글은 바로 자동화가 가능 합니다.
chatGPT 프롬프트를 영어로 작성해 주었기 때문에 지금은 영어로 된 내용을 불러와서 파파고나 구글 번역 API를 이용해서 한글로 번역해서 입력하는 블로그를 만들었어습니다.
그런데 이제는 chatGPT가 발전을 해서 그냥 프롬프트를 한글로 바꿔서 입력해서 자동화를 할수도 있을 것 같습니다.
참고로 블로그를 자동화해서 하루에 5개씩 약 100개정도 글을 올려봤는데 신기하게도 방문자수가 크게 늘어나는것은 느낄 수 없었습니다.
또 이상하게도 chatGPT 무료 사용 기간이 끝나서 더이상 블로그 글을 올리지 않는데 그래도 방문자 숫자가 줄어들지도 않는거 같습니다.
검색엔진에서 AI가 쓴 글들을 어느 정도 걸려주거나 블로그 제목이 아직은 사람이 만든 것보다는 어색한 부분들이 있어서 그럴 확율이 높을 것 같습니다.
chatGPT_API.py
google_translation.py
naver_process.py
test.py
translation.py
unsplash.py
각각의 파일에 해당하는 코스 소스을 알 수 있을까요 ?
혹시 지금도 코드가 잘동하나요?
The only true way to consume protein without any cancer risks is through plant derived proteins [url=https://fastpriligy.top/]priligy where to buy[/url]
very neat thank you,peerjournal
very neat thank you,medicineinsights
very neat thank you,pharmares
very neat thank you,peerreviewedjournals
very neat thank you,medicinaljournals
very neat thank you,journalsres
very neat thank you,edentalcentral
very neat thank you,emedsci
very neat thank you,dentistryjournals
Free radicals that can injure vestibular and cochlear hair cells are generated by aminoglycosides in the inner ear can i buy generic cytotec for sale
This can be accomplished with a wet warm washcloth, microwaveable eye masks sold at drugstores, or a plug in electric heating pad can i buy cheap cytotec without a prescription Schenck NL, Ogura JH, Pratt LL
It purports to be a testosterone booster and aromatase inhibitor, similar to 6 OXO order cheap cytotec
very neat thank you,vdtarification
very neat thank you,atkpalvelut
experience and quality thank you.planetbioplastics
experience and quality thank you.osteriailcapodaglio
experience and quality thank you.lucagnizio
very neat thank you,coralia
very neat thank you,elannonnayttamo
very neat thank you,hihna
experience and quality thank you.phytosif
experience and quality thank you.marinanova
experience and quality thank you.toscanibus
very neat thank you,jedit
very neat thank you,jukumech
very neat thank you,kimmokakko
very neat thank you,konemies
very neat thank you,kotekservice
very neat thank you,soep.vincentwielders
experience and quality thank you.ebiketime
experience and quality thank you.hoteldellaspina
Now, will the aromatase inhibitors take advantage of a similar pathway donde puedo comprar pastillas cytotec
very neat thank you,rolltech.com
very neat thank you,volt-energy.com
very neat thank you,kaabia-orthodontie
very neat thank you,semapsolar
very neat thank you,zouila
very neat thank you,garaconfection
very neat thank you,ellatafa
very neat thank you,novamaille
very neat thank you,rimpex-medical
very neat thank you,fgt-trading
very neat thank you,thebestofcolumbia
very neat thank you,thebestofjacksonville
very neat thank you,thebestofoakland
very neat thank you,thebestofspokane
experience and quality thank you.honefoss.bolkan
experience and quality thank you.heimdalbygg
experience and quality thank you.gjonnes-bygg
very neat thank you,federalnetworks
very neat thank you,filtaclean
very neat thank you,footpharmacydirect
experience and quality thank you.transportopplaering
experience and quality thank you.integraff
very neat thank you,fourcmanagement
very neat thank you,fourcmanagement
very neat thank you,fullthrottleeventplanning
very neat thank you,footpharmacydirect
very neat thank you,funda-mantels
very neat thank you,fursbysuperior
very neat thank you,gdezinewraps
very neat thank you,ggsupplywholesale
very neat thank you,federalnetworks
very neat thank you,federalnetworks
experience and quality thank you.lawsandtaxes
experience and quality thank you.localvisits
experience and quality thank you.hotelposeidon
very neat thank you,fixcarsny
very neat thank you,fixcars
very neat thank you,floorbufferbrush
very neat thank you,floormachinebrush
very neat thank you,fixcars
experience and quality thank you.codingxcamp
experience and quality thank you.promisinguk
very neat thank you,goodnewsbooks
very neat thank you,gopaverinstaller
very neat thank you,gmstow
very neat thank you,gunnbrush
very neat thank you,gpbconstruction
very neat thank you,greatneckcollision
very neat thank you,greenpowerchemical
very neat thank you,gmstowing
very neat thank you,handfordoil
experience and quality thank you.elgars
experience and quality thank you.kcfap
experience and quality thank you.pilotexamsdgca
very neat thank you,hamptonssepticservices
very neat thank you,horizonconceptinc
very neat thank you,housatonicpaper
very neat thank you,icsatc
very neat thank you,gritbrush
very neat thank you,goelectricnj
very neat thank you,icsatc
very neat thank you,imperialvendinginc
very neat thank you,industrialfinishings
very neat thank you,harrishardware
very neat thank you,insurancemarketingpros
very neat thank you,ircinc
very neat thank you,gettingerfeathers
experience and quality thank you.iasautomotive
When mice are exposed to a cancer causing drug, DMBA, many of them get mammary tumors, but not if they are pretreated with pomegranate emulsion furosemide 20 mg tabs