WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead
ModuleNotFoundError: No module named 'fake_useragent'
'''
try:
예외가 발생할 가능성이 있는 코드
except:
예외가 발생했을 때 실행할 코드
(필요에 따라 except 절을 추가로 작성)
'''
try: #Private User Check
html = requests.get(url,headers=headers).text
if 'profile_fatalerror' in html:
steamID = steamID-1
saveUserData(steamID,userCount)
now = datetime.now()
writeLog = open("log.txt",'a')
writeLog.write('Error ID: '+str(steamID)+' Time: '+str(now)+'\n')
writeLog.close()
print("429 Error")
time.sleep(1800)
continue
htmlSearch = re.search(r'var rgGames =(.+?);',html, re.S)
gameList = htmlSearch.group(1)
SteamGame = json.loads(gameList)
except:
saveUserData(steamID,userCount)
continue