Skip to content

Instantly share code, notes, and snippets.

@RohanArora13
Created June 21, 2022 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RohanArora13/6b647b7171a52c94629abb210df46a03 to your computer and use it in GitHub Desktop.
Save RohanArora13/6b647b7171a52c94629abb210df46a03 to your computer and use it in GitHub Desktop.
Python code to check if a steam user exsist with a specific username
import requests
from bs4 import BeautifulSoup
def check(username):
URL = "https://steamcommunity.com/id/"+username
page = requests.get(URL)
soup = BeautifulSoup(page.text, "lxml")
# print(soup)
element = soup.find_all(class_="profile_header")
if(element):
return True
else:
return False
print(check("shroud"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment