This example uses Python's while statement to brush its own blog
Note: This function is only to show the powerful features of Python, not to attack anyone, let us be a citizen Netizen
Bring in the Python package you need
Import WebBrowser as web as is to change Baoming or call connection as
Import time
Import OS
Import Random
Use the Randint method inside the random package to randomly generate a number from 2 to 4.
Count = Random.randint (2,4)
Here is a while nested
A = 0
While a <count:
A = A+1
i = 0
While I <= 19:
Use the Ope_new_tab method inside the WebBrowser package to open the appropriate URL address
Web.open_new_tab (' http://xinsir.blog.51cto.com/5038915/1537866 ')
i = i + 1
Stay 1 seconds before opening the second window
Time.sleep (1)
Else
If it has been brushed 20 times, wait 1 seconds and then close the browser
Time.sleep (1)
Os.system (' taskkill/f/im chrome.exe ')
This article is from the "Loyalty" blog, make sure to keep this source http://xinsir.blog.51cto.com/5038915/1538485