This commit is contained in:
Joseph Cheung 2023-03-05 00:17:12 +08:00
parent 5739de4f98
commit 41c67cf5f4
2 changed files with 20 additions and 0 deletions

View file

@ -811,6 +811,16 @@ def search():
results.remove(res) results.remove(res)
except:pass except:pass
for res in results: for res in results:
if 'engine' in res and res['engine'] == 'twitter':
try:
if gfw.exists(res['title']):
results.remove(res)
# return index_error(output_format, gettext('No item found')), 500
if gfw.exists(res['content']):
# return index_error(output_format, gettext('No item found')), 500
results.remove(res)
continue
except:pass
if 'url' not in res: continue if 'url' not in res: continue
if 'title' not in res: continue if 'title' not in res: continue

View file

@ -811,6 +811,16 @@ def search():
results.remove(res) results.remove(res)
except:pass except:pass
for res in results: for res in results:
if 'engine' in res and res['engine'] == 'twitter':
try:
if gfw.exists(res['title']):
results.remove(res)
# return index_error(output_format, gettext('No item found')), 500
if gfw.exists(res['content']):
# return index_error(output_format, gettext('No item found')), 500
results.remove(res)
continue
except:pass
if 'url' not in res: continue if 'url' not in res: continue
if 'title' not in res: continue if 'title' not in res: continue