Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
94 views
in Technique[技术] by (71.8m points)

python 3.x - Extract text from a facebook post that contain the command Other

with selenium, I'm trying to extract text from posts on Facebook. In particular, I use the hashtag research and from the results, I'm going to get the data from each post. I'm in trouble with the possibility of Facebook to show all the text with the keyword "Other..." at the end of the text. When I'm using the code below after I receive a problem with the element that it does not exist or it is not viewed before.

other = m.find_element_by_xpath('//div[@role="button"]')
#ActionChains(driver).move_to_element(p).click(other).perform()
driver.execute_script("arguments[0].click();", other)

I'm trying to click on each of the other word before start to get the content but when I'm doing the selenium require me to reload the page.

Can you help me?

question from:https://stackoverflow.com/questions/66045219/extract-text-from-a-facebook-post-that-contain-the-command-other

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...