コード例 #1
0
ファイル: server.py プロジェクト: CestDiego/search-aggregator
def yahoo_search():
    search_query = request.args.get('q')
    try:
        yahoo_results = yahoo(search_query)
    except:
        yahoo_results = ["No Results Found"]
    return jsonify({"results": yahoo_results})
コード例 #2
0
ファイル: server.py プロジェクト: CestDiego/search-aggregator
def search():
    search_query = request.args.get('q')

    try:
        google_results = google(search_query)
    except:
        google_results = ["No Results Found"]

    try:
        yahoo_results = yahoo(search_query)
    except:
        yahoo_results = ["No Results Found"]

    try:
        bing_results = bing(search_query)
    except:
        bing_results = ["No Results Found"]
    return jsonify({"results": google_results + yahoo_results + bing_results})