def __init__(self, url, proxies: Optional[str]=None, timeout: Optional[Union[(float, Tuple, None)]]=None):
    if settings.TEST_MODE:
        page_data = url.read()
        url = 'https://test.example.com/'
    else:
        page_data = requests.get(url, headers=HEADERS, proxies=proxies, timeout=timeout).content
    self.soup = BeautifulSoup(page_data, 'html.parser')
    self.url = url
    try:
        self.schema = SchemaOrg(page_data)
    except JSONDecodeError:
        pass
    for (name, func) in inspect.getmembers(self, inspect.ismethod):
        current_method = getattr(self.__class__, name)
        for plugin in reversed(settings.PLUGINS):
            if plugin.should_run(self.host(), name):
                current_method = plugin.run(current_method)
        setattr(self.__class__, name, current_method)
def __init__(self, url, proxies: Optional[str]=None, timeout: Optional[Union[(float, Tuple, None)]]=None):
    if settings.TEST_MODE:
        page_data = url.read()
        url = 'https://test.example.com/'
    else:
        page_data = requests.get(url, headers=HEADERS, proxies=proxies, timeout=timeout).content
    self.soup = BeautifulSoup(page_data, 'html.parser')
    self.url = url
    try:
        self.schema = SchemaOrg(page_data)
    except JSONDecodeError:
        pass
    for (name, func) in inspect.getmembers(self, inspect.ismethod):
        current_method = getattr(self.__class__, name)
        for plugin in reversed(settings.PLUGINS):
            if plugin.should_run(self.host(), name):
                current_method = plugin.run(current_method)
        setattr(self.__class__, name, current_method)