def _fetch(self, url):
     """
     Fetches from a URL, respecting GZip encoding, etc.
     
     Returns an OEmbedResource instance
     """
     return fetch_url(url)
Ejemplo n.º 2
0
 def _fetch(self, url):
     """
     Fetches from a URL, respecting GZip encoding, etc.
     
     Returns an OEmbedResource instance
     """
     return fetch_url(url)
Ejemplo n.º 3
0
 def autodiscover(self, url):
     """
     Load up StoredProviders from url if it is an oembed scheme
     """
     headers, response = fetch_url(url)
     if headers['content-type'] in ('application/json', 'text/javascript'):
         provider_data = json.loads(response)
         return self.store_providers(provider_data)
Ejemplo n.º 4
0
 def autodiscover(self, url):
     """
     Load up StoredProviders from url if it is an oembed scheme
     """
     headers, response = fetch_url(url)
     if headers['content-type'] in ('application/json', 'text/javascript'):
         provider_data = json.loads(response)
         return self.store_providers(provider_data)