After python beginners, I learned from the Internet can be automatically on taobao order regularly, but at the end of the input pays a password didn't write online, the need to manually enter a password, I want to ask how to pay with python implementation can automatically input password to complete the order? Another problem is that I learned from taobao online shopping cart in order, but some taobao are only from commodity links page order, could you tell me the commodity links page order to pay, how to modify the code in python implementation? Please help me advice on these two questions!
CodePudding user response:
To enter a password here, isn't it just have direct input into the keyboard input number, if so, you find a button simulation library (pyautogui or pykeyboard... ) in this step, try simulate button (your password)
CodePudding user response:
reference 1st floor weiweixiao995 response: to enter the password here, isn't it just have direct input into the keyboard input number, if so, you find a button simulation library (pyautogui or pykeyboard... ) in this step, to simulate the key (password) you try thank you for your guidance, I am a beginner, is learned VB has some basic before, so you can teach me a little detail? Tell me the specific steps and specific code, be obliged! CodePudding user response:
Find the node selenium after the send () can be automatically give input CodePudding user response:
reference 1st floor weiweixiao995 response: to enter the password here, isn't it just have direct input into the keyboard input number, if so, you find a button simulation library (pyautogui or pykeyboard... ) in this step, to simulate the key (password) try I checked the, want to use what you have said pykeyboard, also install better front, there are still many pits, not immediately can use, I also in slowly groping, but thank you for your remind, let me have the direction! This is the hole on the BBS guidance: https://blog.csdn.net/u014314850/article/details/88352794 CodePudding user response:
reference Jaryy reply: 3/f find node selenium after the send () automatically to enter The key is I don't know how to find the pay node, and then send detailed how to use also is not very clear, ah CodePudding user response:
Use pyautogui library, I can use here, put this code in need password there import pyautogui The import time Time. Sleep (3) # add a time waiting in front of the page loading is completed, the speed in setting up how many seconds right Def the password (s) : Pyautogui. Press (' 1 ') # 1 password Pyautogui. Press (' 1 ') # input password second Pyautogui. Press (' 1 ') # third password Pyautogui. Press (' 3 ') # input password 4 Pyautogui. Press (' 4 ') # input password fifth Pyautogui. Press (' 1 ') # input password sixth Pyautogui. Press (the 'enter') # input enter CodePudding user response:
Learning ~ ~ ~ ~ ~ ~ ~ ~ CodePudding user response:
refer to 6th floor weiweixiao995 response: use pyautogui library, I can use here, put this code in need password there import pyautogui The import time Time. Sleep (3) # add a time waiting in front of the page loading is completed, the speed in setting up how many seconds right Def the password (s) : Pyautogui. Press (' 1 ') # 1 password Pyautogui. Press (' 1 ') # input password second Pyautogui. Press (' 1 ') # third password Pyautogui. Press (' 3 ') # input password 4 Pyautogui. Press (' 4 ') # input password fifth Pyautogui. Press (' 1 ') # input password sixth Pyautogui. Press (the 'enter') # input enter Use this library finally successful installation, also enter a success, but because I code isn't skilled, don't know the deadline and judgment errors, I give you my code direct messages, trouble you can help me to check it out? Be very grateful! CodePudding user response:
refer to the eighth floor ssff117 response: Quote: refer to the sixth floor weiweixiao995 response: Use pyautogui library, I can use here, put this code in need password there import pyautogui The import time Time. Sleep (3) # add a time waiting in front of the page loading is completed, the speed in setting up how many seconds right Def the password (s) : Pyautogui. Press (' 1 ') # 1 password Pyautogui. Press (' 1 ') # input password second Pyautogui. Press (' 1 ') # third password Pyautogui. Press (' 3 ') # input password 4 Pyautogui. Press (' 4 ') # input password fifth Pyautogui. Press (' 1 ') # input password sixth Pyautogui. Press (the 'enter') # input enter Use this library finally successful installation, also enter a success, but because I code isn't skilled, don't know the deadline and judgment errors, I give you my code direct messages, trouble you can help me to check it out? Be very grateful! yes, I try