Permalink
Browse files

Merge pull request #8 from sk1p/text_javascript

support non-standard text/javascript response
  • Loading branch information...
2 parents d9e6208 + 34c2baa commit bb3d14213e0ac91aa998af67182826b6f1529fe6 @abarmat committed Apr 5, 2016
Showing with 1 addition and 0 deletions.
  1. +1 −0 oembed/__init__.py
View
@@ -360,6 +360,7 @@ def fetch(self, url):
headers['Content-Type'].find('text/xml') != -1:
response = OEmbedResponse.newFromXML(raw)
elif headers['Content-Type'].find('application/json') != -1 or \
+ headers['Content-Type'].find('text/javascript') != -1 or \
headers['Content-Type'].find('text/json') != -1:
response = OEmbedResponse.newFromJSON(raw)
else:

0 comments on commit bb3d142

Please sign in to comment.