This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SeleniumWebScraper: | |
def __init__(self, url, pattern, wait_time=3): | |
self.url = url | |
self.pattern = re.compile(pattern, re.IGNORECASE) | |
self.wait_time = wait_time | |
def scrape(self): | |
"""Scrape the given URL for the pattern using Selenium to handle AJAX content""" | |
try: | |
options = Options() |