Day 096 - Yelp scraping forbidden?

Hi everyone,
I am trying to follow the example, but seems web scraping Yelp is prevented(?).
Not a big problem for day 96, but functional example would be nice :see_no_evil:

if I simply add the example code as below, then I get the below screenshot result. And this has happened with every Yelp link I’ve tried so far.
If I try link from another site, I do get proper results.

After some googling I’m understanding that CloudFront might be the reason blocking web crawler access.
Any possibility to get around this?


import requests
from bs4 import BeautifulSoup

url = "https://www.yelp.co.uk/search?find_desc=Restaurants&find_loc=San+Francisco%2C+CA%2C+United+States"

response = requests.get(url)
html = response.text

print(html)

9 posts were merged into an existing topic: Day 096 - Project 96 : Let’s get scraping