Created
August 13, 2020 15:49
-
-
Save jmrobles/870af72f736fbfab55ef1d11b2f4d4fb to your computer and use it in GitHub Desktop.
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 ScrapedWeb(object): | |
""" | |
Scraped web (POJO) | |
""" | |
def __init__(self, url: str, title: str, description: str, headings: List[str], contents: List[str], dom: BeautifulSoup): | |
self.url = url | |
self.title = title | |
self.description = description | |
self.headings = headings | |
self.contents = contents | |
self.dom = dom | |
def __str__(self): | |
return f"'{self.title}' @ {self.url}" | |
def __repr__(self): | |
return f"{self.title}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment