def thumbnails():
    if request.method == "GET":
        images = getUrls()
        if not images:
            results = {"error": True, "message": "fail", "thumbnails": []}
        else:
            results = {
                "error": None,
                "message": "success",
                "thumbnails": getUrls()
            }
        return jsonify(results)
    return render_template('wishlist.html')
Exemple #2
0
def getThumbnail():
    url = request.json['url']
    return jsonify(getUrls(url)), 200