Scrape for "paris coronavirus" images

This commit is contained in:
2020-06-15 01:19:13 +02:00
parent da4d9b1dad
commit 8307a54fe0
4 changed files with 6 additions and 6 deletions

View File

@@ -4,14 +4,14 @@ from typing import List
from bs4 import BeautifulSoup
from requests import get
from constants import FLICKR_URL, URL
from constants import FLICKR_URL, DATASET_URL
def format_url(dataset) -> str:
"""
Constructs the API's URL for the requested dataset
"""
link = URL.format(dataset)
link = DATASET_URL.format(dataset)
return link

View File

@@ -33,5 +33,5 @@ def map():
@app.route("/photos")
def photos():
images = scrape_flickr("paris")
images = scrape_flickr("paris coronavirus")
return render_template("photos.html", title="Photos", images=images)