Python Forum

Full Version: using webbot for website login fails
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there, i am just starting with python and read that there is such a nice method to login into websites (and later i want extract data from it).

So I did "pip install webbot" and wrote to a file test.py:

from webbot import Browser
web = Browser()
web.go_to('web.de')
(just an example) - but what happens is that Chrome browser opens saying "not safe" and "data:,"
Why this? it's not even my default browser..

I was hoping to go strait forward like this example ("quick demo"):

https://webbot.readthedocs.io/en/latest/
A new libary i have not seen before,it's just a wrapper around Selenium Python
(Jan-02-2019, 02:03 PM)loeten Wrote: [ -> ]Why this? it's not even my default browser..
Because that what library use as driver,see drivers.
If want to FireFox then need to use Selenium Python,and install geckodriver.

I did quick test in virtual environment,and it work for me.
from webbot import Browser
import time

web = Browser()
web.go_to('web.de')
time.sleep(3)
# Click agree to use cookie button
web.click(xpath='//*[@id="prioad"]/body/section/aside/button')
If new new to web-scraping in Python look at link under.
There is no need to Selenium all time for web-scraping,it should only be used when needed(can be problem to get JavaScript stuff,login ect...)
Web-Scraping part-1
Web-Scraping part-2
(Jan-02-2019, 04:14 PM)snippsat Wrote: [ -> ]If new new to web-scraping in Python look at link under.
There is no need to Selenium all time for web-scraping,it should only be used when needed(can be problem to get JavaScript stuff,login ect...)
Web-Scraping part-1
Web-Scraping part-2

Thank you for this, this will help a lot!