Skip to content

Instantly share code, notes, and snippets.

@perymerdeka
Created January 18, 2022 17:10
Show Gist options
  • Save perymerdeka/53dd1022446fa33fbf6345df3d04a4b7 to your computer and use it in GitHub Desktop.
Save perymerdeka/53dd1022446fa33fbf6345df3d04a4b7 to your computer and use it in GitHub Desktop.
import requests
from bs4 import Beautifulsoup
url = 'https://www.yell.com/ucs/UcsSearchAction.do?'
params = {
'scrambleSeed': '383401705',
'keywords': 'hotel',
'location': 'New York'
}
headers = {
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36'
}
res = requests(url, params=params, headers=headers)
soup = Beautifulsoup(res.text, 'html.parser')
# scraper disini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment