Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- from bs4 import BeautifulSoup
- # link = input("Enter Web Link (Eg : google.com) : >")
- URL = "https://www.similarweb.com/website/google.com#overview"
- page = requests.Session().get(URL)
- soup = BeautifulSoup(page.content, "html.parser")
- rank = soup.find_all("p",class_ = "wa-rank-list__value")
- all_ranks = []
- for ranks in rank:
- all_ranks.append(ranks)
- print("Global Rank : > " + all_ranks[0].getText())
- print("Country Rank : > " + all_ranks[1].getText())
- print("Category Rank : > " + all_ranks[2].getText())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement