Advertisement
fearlessmcp

Untitled

May 25th, 2022
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. import requests
  2. from bs4 import BeautifulSoup
  3. # link = input("Enter Web Link (Eg : google.com) : >")
  4. URL = "https://www.similarweb.com/website/google.com#overview"
  5.  
  6. page = requests.Session().get(URL)
  7. soup = BeautifulSoup(page.content, "html.parser")
  8. rank = soup.find_all("p",class_ = "wa-rank-list__value")
  9. all_ranks = []
  10. for ranks in rank:
  11. all_ranks.append(ranks)
  12.  
  13. print("Global Rank : > " + all_ranks[0].getText())
  14. print("Country Rank : > " + all_ranks[1].getText())
  15. print("Category Rank : > " + all_ranks[2].getText())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement