Skip to content

Commit

Permalink
Log URL for photo request
Browse files Browse the repository at this point in the history
  • Loading branch information
lthurston authored and Lucas Thurston committed Apr 15, 2023
1 parent 2c1a0a2 commit f526bc6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions metadata_fetcher/fetchers/flk_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from urllib.parse import urlencode
import settings


class FlkFetcher(Fetcher):
BASE_URL: str = "https://api.flickr.com/services/rest/"

Expand Down Expand Up @@ -173,7 +174,6 @@ def transform_vernacular_content(self, content: str) -> str:

return json.dumps(photo_data)


def get_photo_metadata(self, id: str) -> requests.Response:
"""
Performs a request for photo info and returns the response.
Expand All @@ -183,12 +183,14 @@ def get_photo_metadata(self, id: str) -> requests.Response:
Returns: requests.Response
"""
url = self.get_photo_info_request_url(id)

print(
f"[{self.collection_id}]: Fetching photo {id} "
f"({self.photo_index} of {self.photo_total})"
f"({self.photo_index} of {self.photo_total}) at {url}"
)

return requests.get(url=self.get_photo_info_request_url(id))
return requests.get(url=url)

def check_page(self, http_resp: requests.Response) -> bool:
"""
Expand Down

0 comments on commit f526bc6

Please sign in to comment.