Skip to content

Instantly share code, notes, and snippets.

@jmrobles
Created August 13, 2020 15:49
Show Gist options
  • Save jmrobles/870af72f736fbfab55ef1d11b2f4d4fb to your computer and use it in GitHub Desktop.
Save jmrobles/870af72f736fbfab55ef1d11b2f4d4fb to your computer and use it in GitHub Desktop.
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