title: Python Using Adblock with Selenium and Firefox Webdriver
body: <p>My goal is to use Adblock Plus with Selenium via Python. I have been able to get it to the point where it will load the extension, but by default it does not include the default filter "EasyList." Here is what I have so far:</p>
  
  <pre><code> from selenium import webdriver
   from time import sleep
   ffprofile = webdriver.FirefoxProfile()
   adblockfile = '/Users/username/Downloads/adblock_plus-2.4-tb+fx+an+sm.xpi'
   ffprofile.add_extension(adblockfile)
   ffprofile.set_preference("extensions.adblockplus.currentVersion", "2.4")
   browser = webdriver.Firefox(ffprofile)
   while(True):
      browser.get("www.cnn.com")
      sleep(5)
  </code></pre>
  
  <p>Most of this code was ripped off of <a href="http://selenium-python.readthedocs.org/en/latest/faq.html" rel="noreferrer">http://selenium-python.readthedocs.org/en/latest/faq.html</a></p>