Python Forum
How to geckodriver anonymous firefox
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to geckodriver anonymous firefox
#3
No luck my friend
Here is my problem
I can access one website only with firefox and anonymous extension actived otherwise I got blocked with <script src='https://www.google.com/recaptcha/api.js'></script>
If I use the following program I can't reach the website and I got
Error:
Traceback (most recent call last): File "C:/Users/ASUS PC/AppData/Local/Programs/Python/Python36/gg.py", line 14, in <module> print(welcome.text) AttributeError: 'list' object has no attribute 'text'
Here is my code:
import requests
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.firefox.options import Options

#-- Setup
options = Options()
options.add_argument("--headless")
browser = webdriver.Firefox(firefox_options=options)
#-- Parse
browser.get('http://I want to enter')
soup = BeautifulSoup(browser.page_source, 'lxml')
welcome = soup.select('head > title')
print(welcome.text)


No luck with
welcome = soup.select('head > title')
print(welcome[0].text)
either. Got error
Error:
Traceback (most recent call last): File "C:/Users/ASUS PC/AppData/Local/Programs/Python/Python36/gg.py", line 14, in <module> print(welcome[0].text) IndexError: list index out of range
Reply


Messages In This Thread
RE: How to geckodriver anonymous firefox - by mariolopes - Feb-10-2018, 08:32 PM
RE: How to geckodriver anonymous firefox - by wavic - Feb-10-2018, 08:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help for script access via webdriver to an open web page in Firefox Clixmaster 1 1,412 Apr-20-2023, 05:27 PM
Last Post: farshid
  Connect to existing Firefox session with Selenium euras 0 5,658 Feb-11-2021, 02:54 PM
Last Post: euras
  Selenium error with ebdriver (geckodriver) Martinelli 4 4,896 Sep-24-2019, 01:40 AM
Last Post: Martinelli
  Unable to access javaScript generated data with selenium and headless FireFox. pjn4 0 2,644 Aug-04-2019, 11:10 AM
Last Post: pjn4
  Firefox Selenium (open new tab) oneclick 1 7,892 Dec-29-2018, 06:59 AM
Last Post: hbknjr
  selenium not running firefox Sanlus 5 5,086 Aug-31-2018, 10:37 PM
Last Post: snippsat
  Selenium with headless firefox is slow mgtheboss 4 15,183 Jan-13-2018, 09:03 PM
Last Post: metulburr
  Getting error 'geckodriver' executable needs to be in PATH. sumandas89 2 37,730 Jan-11-2018, 07:54 AM
Last Post: sumandas89

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020