comparison oembed/core.py @ 907:344f7914d421

Add scheme=https to oembed request. YouTube added this so you could get HTML that used https to embed the video. It seems that Vimeo also supports it.
author Brian Neal <bgneal@gmail.com>
date Sun, 15 Mar 2015 21:48:33 -0500
parents 89b240fe9297
children 2181da65c98b
comparison
equal deleted inserted replaced
905:be233ba7ca31 907:344f7914d421
50 return json.loads(result) 50 return json.loads(result)
51 51
52 if __name__ == "__main__": 52 if __name__ == "__main__":
53 try: 53 try:
54 print get_oembed("http://www.youtube.com/oembed", 54 print get_oembed("http://www.youtube.com/oembed",
55 "http://www.youtube.com/watch?v=7_IMzJldOf4") 55 "http://www.youtube.com/watch?v=7_IMzJldOf4",
56 scheme='https')
56 except urllib2.HTTPError, e: 57 except urllib2.HTTPError, e:
57 print e 58 print e