Python Forum
Scrape Facebook page user posts text
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scrape Facebook page user posts text
#1
Hello! 

I am new to Python and looking for a solution to scrape all user posts with replies from other users and the page (text) from a Facebook page over a period of three days last year. How to do this? And anyone willing to help me? 

Greetings from a student in Stockholm.
Reply
#2
Hey there. I'll see what I can do for you tomorrow morning once I am on my computer, but I believe I should be able to create what you want fairly easily and then submit the source code. However, scanning over what I have to work with, might require more than a day in order to balance things out properly.

All the best,

Joseph
Reply
#3
(May-08-2017, 12:40 AM)KJoseph_f2 Wrote: Hey there. I'll see what I can do for you tomorrow morning once I am on my computer, but I believe I should be able to create what you want fairly easily and then submit the source code. However, scanning over what I have to work with, might require more than a day in order to balance things out properly.

All the best,

Joseph
Reply
#4
facebook has its own API. It would be wise to scrape posts via their API verses logging in via selenium...otherwise you could find yourself blocked from facebook from repetitive requests.
Recommended Tutorials:
Reply
#5
(May-08-2017, 12:51 AM)metulburr Wrote: facebook has its own API. It would be wise to scrape posts via their API verses logging in via selenium...otherwise you could find yourself blocked from facebook from repetitive requests.
Yup, I had the API in mind. Not 100% sure how limited it might be yet. However, I know that manually attempting to extract posts from some HTML source code is a headache in itself and a last resort too.
Reply
#6
last i recall their API would allow everything from posting on your behalf to changing settings. I personally prefer BeautifulSoup and scraping HTML as i am comfortable with it, and I hate learning API's but facebook is probably the one of the tightest places. I get banned from posting in groups when i manually do it due to posting to too many groups within X timeframe. Couldnt imagine a bot.
Recommended Tutorials:
Reply
#7
(May-08-2017, 03:00 AM)metulburr Wrote: last i recall their API would allow everything from posting on your behalf to changing settings. I personally prefer BeautifulSoup and scraping HTML as i am comfortable with it, and I hate learning API's but facebook is probably the one of the tightest places. I get banned from posting in groups when i manually do it due to posting to too many groups within X timeframe. Couldnt imagine a bot.
True, it could be fairly problematic. However, OP only wants to retrieve a user's feed from what I can tell. So providing I don't send too many query requests, I think it should be fine (fingers crossed) :)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  how to scrape page that works dynamicaly? samuelbachorik 0 683 Sep-23-2023, 10:38 AM
Last Post: samuelbachorik
  Automating Facebook Posts mieciow 2 1,335 Aug-07-2023, 12:34 PM
Last Post: Gaurav_Kumar
  to scrape wiki-page: getting back the results - can i use pandas also apollo 2 2,602 Feb-09-2021, 03:57 PM
Last Post: apollo
Photo How do I scrape a web page? oradba4u 2 2,075 Dec-23-2020, 12:35 PM
Last Post: codeto
  Web scrapping login facebook credentials kosmas9 0 1,912 Aug-17-2020, 01:33 PM
Last Post: kosmas9
  Beautifulsoup doesn't scrape page (python 2.7) Hikki 0 1,950 Aug-01-2020, 05:54 PM
Last Post: Hikki
  How to click facebook message button JanelleGuthrie 2 2,371 May-14-2020, 06:02 PM
Last Post: Larz60+
  use Xpath in Python :: libxml2 for a page-to-page skip-setting apollo 2 3,579 Mar-19-2020, 06:13 PM
Last Post: apollo
  scrape data 1 go to next page scrape data 2 and so on alkaline3 6 5,089 Mar-13-2020, 07:59 PM
Last Post: alkaline3
  user spamming just to get 5 posts to make attachments metulburr 4 2,280 Dec-31-2018, 11:03 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020