|
|
@@ -21,6 +21,9 @@ def response(resp):
|
|
21
|
21
|
for res in search_res['items']:
|
|
22
|
22
|
title = res['name']
|
|
23
|
23
|
url = res['html_url']
|
|
24
|
|
- content = escape(res['description'][:500])
|
|
|
24
|
+ if res['description']:
|
|
|
25
|
+ content = escape(res['description'][:500])
|
|
|
26
|
+ else:
|
|
|
27
|
+ content = ''
|
|
25
|
28
|
results.append({'url': url, 'title': title, 'content': content})
|
|
26
|
29
|
return results
|