def __init__(self, url=None, name=None): self.url = url self.name = name if url: self.set_url(url) if not name: self.name = get_class_name(self)
def __init__(self, url='', soup=None): self.name = validate_attribute_name(get_class_name(self)) if url: self.set_url(url) if soup: self.set_soup(soup)