coleifer / micawber

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

Google Maps with HTTPS not working. #10

Closed fxdgear closed 11 years ago

fxdgear commented 11 years ago

I'm not 100% certain what the issue is, but I'll give you as many details as possible.

my site is behind https (only). When trying to embed a map using an https link, the map does not embed.

When switching the URL to http the map will embed.

poking in the source I found: https://github.com/coleifer/micawber/blob/master/micawber/contrib/providers.py#L34

Which seems to only accept http as a valid url for google maps?

I think the problem might be that google redirects to https if you just go to maps.google.com.

So then when trying to embed a google map with https it fails the regex match?

fxdgear commented 11 years ago

Note: I was also digging around Embedly's docs and found this: http://embed.ly/docs/features/ssl

basically it is a way for them to serve media behind https, to help reduce "unsafe" content warnings.

coleifer commented 11 years ago

I added support for https to the regex.

Adding support for https looks straightforward if you're using embedly, just pass secure=True.

It should work like this:

providers = bootstrap_embedly(key='foobar', secure=tRue)

fxdgear commented 11 years ago

@coleifer Super!

Thanks man!