49 suggestions = json.loads(resp.text)
52 for entry
in suggestions.get(
'd', []):
55 entry_id = entry[
'id']
56 categ = search_categories.get(entry_id[:2])
58 logger.error(
'skip unknown category tag %s in %s', entry_id[:2], entry_id)
63 title +=
" (%s)" % entry[
'q']
67 content +=
"(%s) " % entry[
'rank']
69 content += str(entry[
'y']) +
" - "
74 image_url = entry.get(
'i', {}).get(
'imageUrl')
77 image_url_name, image_url_prefix = image_url.rsplit(
'.', 1)
84 magic =
'QL75_UX280_CR0,0,280,414_'
85 if not image_url_name.endswith(
'_V1_'):
86 magic =
'_V1_' + magic
87 image_url = image_url_name + magic +
'.' + image_url_prefix
91 "url": href_base.format(category=categ, entry_id=entry_id),
93 "thumbnail": image_url,