coleifer / micawber

a small library for extracting rich content from urls
http://micawber.readthedocs.org/
MIT License
635 stars 91 forks source link

Githubgist giving provider exception #95

Closed Pradhvan closed 4 years ago

Pradhvan commented 4 years ago

I tried using micawber for Github gist as it's mentioned it supports it in providers.py

import micawber
providers = micawber.bootstrap_basic()
url = 'https://gist.github.com/Pradhvan/46f5788ac8c86c6bc3981326b236ce4f'
providers.request(url)

This gives out the following traceback

ProviderException                         Traceback (most recent call last)
<ipython-input-4-50b054de6456> in <module>
      1 url = 'https://gist.github.com/Pradhvan/46f5788ac8c86c6bc3981326b236ce4f'
      2 
----> 3 providers.request(url)

/usr/local/lib/python3.8/site-packages/micawber/providers.py in inner(self, url, **params)
    109                 self.cache.set(key, data)
    110             return data
--> 111         return fn(self, url, **params)
    112     return inner
    113 

/usr/local/lib/python3.8/site-packages/micawber/providers.py in request(self, url, **params)
    152         provider = self.provider_for_url(url)
    153         if provider:
--> 154             return provider.request(url, **params)
    155         raise ProviderNotFoundException('Provider not found for "%s"' % url)
    156 

/usr/local/lib/python3.8/site-packages/micawber/providers.py in request(self, url, **extra_params)
     76             return self.handle_response(response, url)
     77         else:
---> 78             raise ProviderException('Error fetching "%s"' % endpoint_url)
     79 
     80     def handle_response(self, response, url):

ProviderException: Error fetching "https://github.com/api/oembed?format=json&url=https%3A%2F%2Fgist.github.com%2FPradhvan%2F46f5788ac8c86c6bc3981326b236ce4f"

Do we need to update the micawber/providers.py and change the pr.register or if it's not supported can we remove it?

coleifer commented 4 years ago

Damn, that's too bad. I've gone ahead and commented it out. I wonder how long it's been broken?