Forum Thread: How Can I Pull FB Page Posts Using Python?

I want to write a script that pulls certain page post when that scrpit is run or executed.

Join the Next Reality AR Community

Get the latest in AR — delivered straight to your inbox.

7 Responses

You can, but god it's not easy. There is a module that does it (idk if its still UTD). You could use requests and use cookies but there are multiple pages that processes the cookies.

Maybe a mechanize module? I don't know that much but it is supposed to work as a browser or something.

You could use the requests module to pull the HTML code for that post down. You could then parse the HTML and you'd be left with the post in plaintext.


in addition to what Defalt said I've had a lot of success using beautiful soup for parsing raw html. you may also want to look into selenium.


I've been experimenting/messing with Beautifulsoup.

It seems to pull the html code directly off the webpage and stores it in a text file,
then the programmer can use prettify() to make it organized,
and can search specific elements within the text file of html code.
I think it was findAll("html element")

what software do you use for coding in python? curiousity

Really I am using kali linux 2.0 and using a text editor called jEdit to code in python. And I write code in python3 :)

Share Your Thoughts

  • Hot
  • Active