Created
June 21, 2022 18:38
-
-
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
This file contains hidden or 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 | |
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