Feb-10-2018, 08:32 PM
(This post was last modified: Feb-10-2018, 08:32 PM by mariolopes.)
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
No luck with
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