S
S
sergey prohorenko2020-05-15 00:13:02
Python
sergey prohorenko, 2020-05-15 00:13:02

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

3 answer(s)
A
Andrey Sobolev, 2020-05-15
@Sobolev5

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

V
Vladislav Lyskov, 2020-05-15
@Vlatqa

selenium

P
pythonist1234, 2020-05-15
@pythonist1234

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 question

Ask a Question

731 491 924 answers to any question