—
My senior two teacher once said, the so-called second kill, 59 seconds also counts as second kill. So… The code:
From Selenium import webdriver import time URL =input(' please input webdriver :') Wd = webdriver.chrome (r'd :/ webdriver /chromedriver.exe') wd. Get (url) time.sleep(15) while True: try: if wd.find_element_by_xpath('//*[@id="btn-reservation"]'): Wd. Find_element_by_xpath (' / / * [@ id = "BTN - reservation"] '). Click () except: time. Sleep pass (0.0001)Copy the code
—
Never take it and use it, because chances are you won’t. First, you need to configure the Seleium environment
You can download chrome and Chromedriver. exe without having to watch the video. ** However, one thing is very important. ** You need to create a new folder on drive D, call it Web Automation, and put the extracted Chromedriver.exe in it. 3. When you run the code, an input line appears: Please enter the url as prompted, and it opens a page. Yes, don’t be surprised. Ten lines of code you want to cook eggplant.
After scanning the code and logging in, he doesn’t care about it, he determines if there’s a snap button, and when it does, he clicks it, in an endless loop, hundreds of times per second. It’s best to run the code two or three minutes before the gun starts. Then leave it alone, but make sure it’s the Snap button. 4. To be honest, this code was written three or four days ago, but remember this twist. I did not use, do not know whether to rob rob to, if you use this method to grab, comment section reply a wave, if you do not grab, or report a mistake, do not scold me (fragile heart can not stand). If the big guy doesn’t like it, you can comment on it in the comments section and talk about advanced technology. 5. If someone snagged it, I’d perfect it along the same lines. Thank you all for your attention.
Recently, many friends have sent messages to ask about learning Python. For easy communication, click on blue to join yourselfDiscussion solution resource base