Selenium versus BeautifulSoup for web scraping

后端 未结 3 1695
暖寄归人
暖寄归人 2020-12-07 08:56

I\'m scraping content from a website using Python. First I used BeautifulSoup and Mechanize on Python but I saw that the website had a button that

3条回答
  •  一生所求
    2020-12-07 09:27

    I would recommend using Selenium for things such as interacting with web pages whether it is in a full blown browser, or a browser in headless mode, such as headless Chrome. I would also like to say that beautiful soup is better for observing and writing statements that rely on if an element is found or WHAT is found, and then using selenium ot execute interactive tasks with the page if the user desires.

提交回复
热议问题