Python Forum
Combining selenium and beautifulsoup for web scraping
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Combining selenium and beautifulsoup for web scraping
#4
Specifically facebook is hard by itself solely because they are trying to stop bots from doing anything on their site, where other sites cannot afford such measures, etc. Any site that has an API is going to try to stop bots, as they want people to use their API to limit their access. But facebook is probably the worst because of their "unlimited funds". Ive seen code try to break bots by randomizing their ID names each session, or they nest iframes to not show the code in the initial source, etc. Along with the usual javascript to break basic bot measures, and obfuscate their code. Usually though its not that, but your code.

If the site you are scraping is facebook, then yes you need selenium.

(Jan-30-2018, 01:39 PM)sumandas89 Wrote: It happens that some contents are available and in the pages but not available in the page source
Sometimes they add things in iframes so that you have to switch to that window to be able to scrape it. But i am unsure as you have not said the exact page you are looking for.

Show your code, and explain what page on facebook (if possible) that you are having trouble scraping and i can see try to see why. If you search these forums there has been previous discussions about scraping facebook and examples given of some basic tasks already. For example:
https://python-forum.io/Thread-facebook-...t=facebook
Recommended Tutorials:
Reply


Messages In This Thread
RE: Combining selenium and beautifulsoup for web scraping - by metulburr - Jan-30-2018, 02:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Scraping div tags with selenium, need help hfakoor2 1 1,134 Mar-12-2023, 08:31 AM
Last Post: hfakoor2
  Scraping based on years BeautifulSoup rhat398 0 1,792 May-22-2021, 07:20 PM
Last Post: rhat398
  Web scraping cookie in URL blocks selenium Alex06 2 2,485 Jan-10-2021, 01:43 PM
Last Post: Alex06
  Extract data with Selenium and BeautifulSoup nestor 3 4,002 Jun-06-2020, 01:34 AM
Last Post: Larz60+
  Beautifulsoup Scraping PolskaYBZ 3 3,240 Jun-22-2019, 10:05 AM
Last Post: PolskaYBZ
  Web scraping (selenium (i think)) Larz60+ 10 6,319 Jan-27-2019, 02:57 AM
Last Post: Larz60+
  Web Page not opening while web scraping through python selenium sumandas89 4 10,177 Nov-19-2018, 02:47 PM
Last Post: snippsat
  web scraping with selenium and bs4 Prince_Bhatia 2 3,816 Sep-18-2018, 10:59 AM
Last Post: Prince_Bhatia
  scraping javascript websites with selenium DoctorEvil 1 3,420 Jun-08-2018, 06:40 PM
Last Post: DoctorEvil
  web scraping using selenium sumandas89 3 3,628 Jan-05-2018, 01:45 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

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