ox.web under_score api rewrite

This commit is contained in:
j 2012-08-15 17:15:40 +02:00
commit a4fd3c930f
29 changed files with 268 additions and 285 deletions

View file

@ -7,7 +7,7 @@ from utils import json, ET
def get_embed_code(url, maxwidth=None, maxheight=None):
embed = {}
header = cache.getHeaders(url)
header = cache.get_headers(url)
if header.get('content-type', '').startswith('text/html'):
html = cache.readUrl(url)
json_oembed = filter(lambda l: 'json+oembed' in l, re.compile('<link.*?>').findall(html))