def data(page=1): filter_field = request.args.get('filter-field') filter_regex = request.args.get('filter-regex') blur_level = get_blur_level() return render_template('data.html', hosts=None, which_collection="crawl-data", filter_field = filter_field, filter_regex = filter_regex, use_cc_data=False, blur_level=blur_level, img_height=StaticSettings().host_img_height, img_width=StaticSettings().host_img_width)
def known_urls(host=None): urls = list(urls_handler(host, which_collection="known-data")) if request_wants_json(): return Response(json.dumps(urls), mimetype="application/json") blur_level = get_blur_level() # change this return render_template("urls.html", urls=urls, use_known_data=True, blur_level=blur_level, img_height=StaticSettings().url_img_height, img_width=StaticSettings().url_img_width)
def known_data(page=1): blur_level = get_blur_level() return render_template('data.html', hosts=None, use_known_data=True, blur_level=blur_level, img_height=StaticSettings().host_img_height, img_width=StaticSettings().host_img_width)
def urls(host=None): urls = urls_handler(host) if request_wants_json(): return Response(json.dumps(urls), mimetype="application/json") # !super hacky for url_dic in urls: screenshot_path = url_dic.get("screenshot_path") if screenshot_path: url_dic["screenshot_path"] = get_screenshot_relative_path(screenshot_path) url_dic["url_hash"] = str(hashlib.md5(url_dic["url"]).hexdigest()) blur_level = get_blur_level() return render_template("urls.html", urls=urls, blur_level=blur_level, img_height=StaticSettings().url_img_height, img_width=StaticSettings().url_img_width)
def data(page=1): filter_field = request.args.get('filter-field') filter_regex = request.args.get('filter-regex') blur_level = get_blur_level() return render_template('data.html', hosts=None, which_collection="crawl-data", filter_field=filter_field, filter_regex=filter_regex, use_cc_data=False, blur_level=blur_level, img_height=StaticSettings().host_img_height, img_width=StaticSettings().host_img_width)
def urls(host=None): urls = urls_handler(host) if request_wants_json(): return Response(json.dumps(urls), mimetype="application/json") # !super hacky for url_dic in urls: screenshot_path = url_dic.get("screenshot_path") if screenshot_path: url_dic["screenshot_path"] = get_screenshot_relative_path( screenshot_path) url_dic["url_hash"] = str(hashlib.md5(url_dic["url"]).hexdigest()) blur_level = get_blur_level() return render_template("urls.html", urls=urls, blur_level=blur_level, img_height=StaticSettings().url_img_height, img_width=StaticSettings().url_img_width)
def get_blur_page(): blur_level = get_blur_level() return render_template('blur.html', blur_level=blur_level)