Answer the question
In order to leave comments, you need to log in
How to write a python script to manage a website?
I have a site where I need to perform actions. You need to write a script so that he performs these actions himself. without me. for example
, you need to go there,
select it,
then go here,
click it
, etc.
how can this be implemented? maybe there is a library?
and a library that moves the cursor doesn't fit.
Answer the question
In order to leave comments, you need to log in
I recommend webbot
https://github.com/nateshmbhat/webbot
from webbot import Browser
web = Browser()
web.go_to('google.com')
web.type('hello its me') # or web.press(web.Key.SHIFT + 'hello its me')
web.press(web.Key.ENTER)
web.go_back()
web.click('Sign in')
web.type('[email protected]' , into='Email')
web.click('NEXT' , tag='span')
web.type('mypassword' , into='Password' , id='passwordFieldId')
web.click('NEXT' , tag='span') # you are logged in . woohoooo
Use requests and BeautifulSoup. The first allows you to make GET and POST requests, the second - to process the received data.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question