1 개요[ | ]
- Selenium으로 페이스북 그룹에 글쓰기
- "Chrome이 자동화된 테스트 소프트웨어에 의해 제어되고 있습니다."
Python
Copy
# settings...
URL = 'https://www.facebook.com/groups/zetawiki/'
EMAIL = 'testuser@example.com'
PASS = 'P@ssw0rd'
CONTENT = 'Hi, there!'
# launch browser
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument("--disable-notifications")
driver = webdriver.Chrome(executable_path='D:/chromedriver.exe',chrome_options=options)
# log in
driver.get(URL)
driver.find_element_by_id('email').send_keys(EMAIL)
el = driver.find_element_by_id('pass')
el.send_keys(PASS)
el.send_keys(Keys.RETURN)
# post
el = driver.find_element_by_name('xhpc_message_text')
el.send_keys(CONTENT)
ActionChains(driver).key_down(Keys.CONTROL).send_keys(Keys.RETURN).key_up(Keys.CONTROL).perform()
#driver.close()
2 같이 보기[ | ]
3 참고[ | ]
편집자 Jmnote
로그인하시면 댓글을 쓸 수 있습니다.
- 분류 댓글:
- 페이스북 (4)
페이스북 ―Pinkcrimson
페이스북 ID 확인 ― Rorychapman페이스북 게시물 순위 알고리즘 EdgeRank ―Pinkcrimson
페이스북 게시물 순위 알고리즘 EdgeRank ― John Jeong