Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests as r
- from bs4 import BeautifulSoup
- headers = {
- "User-Agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0"
- }
- resp = r.get("https://www.google.com/search?q=usd%20to%20gel",headers=headers)
- if resp.status_code == 200:
- soup = BeautifulSoup(resp.text,"html.parser")
- price = soup.find("div",{"id":"knowledge-currency__updatable-data-column"}).find("span",{"class":"DFlfde SwHCTb"}).text
- print(price)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement