Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from selenium import webdriver
- from selenium.webdriver.chrome.options import Options
- from selenium.common.exceptions import NoSuchElementException
- import winsound
- import bs4 as bs
- import urllib.request
- import time
- import os
- import sys
- import colorama
- from colorama import Fore, Back, Style
- colorama.init
- chrome_options = Options()
- chrome_options.add_argument("--headless")
- chrome_options.add_argument("--window-size=600x600")
- driver = webdriver.Chrome(chrome_options=chrome_options)
- driver.get("http://steamcommunity.com/profiles/76561198447338200/edit")
- User = input("user: ")
- Pass = input("pass: ")
- frequency = 100
- duration = 1000
- requests2 = 0
- driver.find_element_by_id("steamAccountName").send_keys(User)
- driver.find_element_by_id("steamPassword").send_keys(Pass)
- driver.find_element_by_id("SteamLogin").click()
- error = "Steam Community :: Error"
- for i in range(3, 0, -1):
- print("Logging in..." + "(" + str(i) + ")", end="\r", flush=True),
- time.sleep(1)
- try:
- logincheck = driver.find_element_by_id("customURL")
- if logincheck.is_displayed():
- print("Logged into " + User + " successfully.")
- ID = input("id to turbo: ")
- print(Style.RESET_ALL + "Now fishing for " + Fore.CYAN + ID + Style.RESET_ALL + "!")
- except NoSuchElementException:
- print(Fore.RED + "Login error!")
- sys.exit()
- driver.find_element_by_id("customURL").clear()
- while True:
- try:
- url = urllib.request.urlopen("http://steamcommunity.com/id/" + ID + "/videos")
- soup = bs.BeautifulSoup(url, 'lxml')
- availability = soup.title.string
- requests2 = requests2 + 1
- print(requests2, end='\r')
- if availability == error:
- driver.find_element_by_id("customURL").send_keys(ID)
- driver.find_element_by_id("customURL").send_keys(u'\ue007')
- customURLcheck = driver.find_element_by_id("customURL").get_attribute('value')
- if customURLcheck == ID:
- print(Fore.GREEN + "You fished " + ID + "!")
- winsound.Beep(frequency, duration)
- sys.exit()
- except urllib.error.HTTPError as e:
- if e.code == 503:
- print("Error code 503! Refreshing.")
- driver.refresh()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement