title: Selenium versus BeautifulSoup for web scraping
body: <p>I'm scraping content from a website using Python. First I used <code>BeautifulSoup</code> and <code>Mechanize</code> on Python but I saw that the website had a button that created content via JavaScript so I decided to use <code>Selenium</code>.</p>
  
  <p>Given that I can find elements and get their content using Selenium with methods like <code>driver.find_element_by_xpath</code>, what reason is there to use <code>BeautifulSoup</code> when I could just use Selenium for everything?</p>
  
  <p>And in this particular case, I need to use Selenium to click on the JavaScript button so is it better to use Selenium to parse as well or should I use both Selenium and Beautiful Soup? </p>