(self, titles=None, descriptions=None, images=None, videos=None, urls=None, feeds=None, **kwargs)
Initialize Extracted instance.

        Extracted always internally stores titles, descriptions, images and
        canonical urls as lists, which can be accessed as properties::

            >>> print x.titles, x.urls, x.images

        The lists should be helpful For situations where you have a editor
        or user who is picking through possible options. For situations where
        you're without a curation mechanism, you can always get the best option
        using associated non-plural properties::

            >>> print x.title, x.url, x.image

        `urls` is a list of strings representing the best-guess canonical
        url for this piece of content as extracted from the HTML document.
        Sometimes there is no canonical URL referenced in the HTML, and in
        that case the using code will need to default to the url it fetched
        the HTML from (which the Extractor  doesn't know about, as it is
        agnostic to the source of information)::

            >>> import requests
            >>> from extraction import Extractor
            >>> url = "http://lethain.com/"
            >>> html = requests.get("url).text
            >>> extracted = Extractor().extract(html)
            >>> canonical_url = extracted.url if extract.url else url

        Titles, descriptions and images should all be lists.
        The lists should be ordered best to worst.
Initialize Extracted instance.
Initialize Extracted instance .
def __init__(self, titles=None, descriptions=None, images=None, videos=None, urls=None, feeds=None, **kwargs):
        """
        Initialize Extracted instance.

        Extracted always internally stores titles, descriptions, images and
        canonical urls as lists, which can be accessed as properties::

            >>> print x.titles, x.urls, x.images

        The lists should be helpful For situations where you have a editor
        or user who is picking through possible options. For situations where
        you're without a curation mechanism, you can always get the best option
        using associated non-plural properties::

            >>> print x.title, x.url, x.image

        `urls` is a list of strings representing the best-guess canonical
        url for this piece of content as extracted from the HTML document.
        Sometimes there is no canonical URL referenced in the HTML, and in
        that case the using code will need to default to the url it fetched
        the HTML from (which the Extractor  doesn't know about, as it is
        agnostic to the source of information)::

            >>> import requests
            >>> from extraction import Extractor
            >>> url = "http://lethain.com/"
            >>> html = requests.get("url).text
            >>> extracted = Extractor().extract(html)
            >>> canonical_url = extracted.url if extract.url else url

        Titles, descriptions and images should all be lists.
        The lists should be ordered best to worst.
        """
        if titles is None:
            titles = []
        if descriptions is None:
            descriptions = []
        if images is None:
            images = []
        if videos is None:
            videos = []
        if urls is None:
            urls = []
        if feeds is None:
            feeds = []

        assert type(titles) in (list, tuple), "titles must be a list or tuple"
        assert type(descriptions) in (list, tuple), "descriptions must be a list or tuple"
        assert type(images) in (list, tuple), "images must be a list or tuple"
        assert type(videos) in (list, tuple), "videos must be a list or tuple"
        assert type(urls) in (list, tuple), "urls must be a list or tuple"
        assert type(feeds) in (list, tuple), "feeds must be a list or tuple"

        self.titles = titles
        self.descriptions = descriptions
        self.images = images
        self.urls = urls
        self.feeds = feeds
        self.videos = videos

        # stores unexpected and uncaptured values to avoid crashing if
        # a technique returns additional types of data
        self._unexpected_values = kwargs
def __init__ ( self , titles = None , descriptions = None , images = None , videos = None , urls = None , feeds = None , * * kwargs ) : if titles is None : titles = [ ] if descriptions is None : descriptions = [ ] if images is None : images = [ ] if videos is None : videos = [ ] if urls is None : urls = [ ] if feeds is None : feeds = [ ] assert type ( titles ) in ( list , tuple ) , "titles must be a list or tuple" assert type ( descriptions ) in ( list , tuple ) , "descriptions must be a list or tuple" assert type ( images ) in ( list , tuple ) , "images must be a list or tuple" assert type ( videos ) in ( list , tuple ) , "videos must be a list or tuple" assert type ( urls ) in ( list , tuple ) , "urls must be a list or tuple" assert type ( feeds ) in ( list , tuple ) , "feeds must be a list or tuple" self . titles = titles self . descriptions = descriptions self . images = images self . urls = urls self . feeds = feeds self . videos = videos # stores unexpected and uncaptured values to avoid crashing if # a technique returns additional types of data self . _unexpected_values = kwargs