Created
January 18, 2022 17:10
-
-
Save perymerdeka/53dd1022446fa33fbf6345df3d04a4b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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