Open CLLane opened 4 years ago
The classes for the /things-to-do/
pages changed so it's only a matter of updating them.
Check pull request #5
So in scraper.py
, replace everything from line 60
to line 83
with:
for card in soup.find_all('a',
class_='Card --content-card-v2 --content-card-item Card--flat')[:limit]:
# CREATE NEW ATTRACTION
curr_attraction = {}
# LOCATION (City, Town)
curr_attraction['location'] = card.find('div',
class_='Card__hat --place').text
# NAME
curr_attraction['name'] = card.find('h3',
class_='Card__heading --content-card-v2-title').find("span").text
# Description
curr_attraction['description'] = card.find('div',
class_='Card__content js-subtitle-content').text
# Coordinates
curr_attraction['coordinates'] = [float(card["data-lat"]), float(card["data-lng"])]
# Image Thumbnail
curr_attraction['img'] = card.find('img')['data-src']
# PATH
curr_attraction['path'] = card['href']
attractions.append(curr_attraction)
return attractions
Problem
I am trying to make a call through post man to
/api/atlas/attractions/japan?city=tokyo&sort=recent&limit=3
and the status code I am receiving is a 200 OK, however the object I am being returned is:The other endpoints are working fine and I am getting back data.
Not sure what is going on but I thought I would throw this up here and see if anyone had suggestions.