fixed @//// in wiki and pep8 spacing
This commit is contained in:
@@ -135,7 +135,7 @@ def oembed(url):
|
||||
for k,v in EMBED_MAPS:
|
||||
if k.match(url):
|
||||
oembed = v+'?format=json&url='+cgi.escape(url)
|
||||
try:
|
||||
try:
|
||||
data = urllib.urlopen(oembed).read()
|
||||
print data
|
||||
return loads(data) # json!
|
||||
@@ -152,7 +152,7 @@ def expand_one(url,cdict):
|
||||
r = cdict[url]
|
||||
else:
|
||||
r = oembed(url)
|
||||
if isinstance(cdict,dict):
|
||||
if isinstance(cdict,dict):
|
||||
cdict[url] = r
|
||||
# if oembed service
|
||||
if 'html' in r:
|
||||
@@ -204,3 +204,4 @@ if __name__=="__main__":
|
||||
else:
|
||||
print test()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user