So I’m trying to click a link if it contains this string somewhere in its html. Here is the HTML: <span class="_3A9bf_kZ6VBA2VBRND5gvf">r/smashbros</span> I’m trying to click the link if it contains the word "smash" somewhere in the element, how would I go about this? I know I can easily do driver.find_element_by_class_name("_3A9bf_kZ6VBA2VBRND5gvf").click() I’m trying to find ..
Okay so I was writing my first selenium code which is: browser.get(‘https://www.jetbrains.com/pycharm/’) browser.find_element_by_link_text(‘Download’) <selenium.webdriver.remote.webelement.WebElement (session="69f43bf4a5e98baf24ad3746dd01b514", element="0fa96685-d871-464f-aaaa-af02238a5f08")> I wanted to simply go to the pycharm website and click on downloads, which worked fine. But when I tried to store the previous function in a variable like so: elem = browser.find_element_by_link_text(‘Download’) I got all these errors: Traceback ..
So im trying to compare 2 lists using python, one contains like 1000 links i fetched from a website. The other one contains a few words, that might be contained in a link in the first list. If this is the case, i want to get an output. i printed that first list, it actually ..
I am using selenium to manipulate chrome driver for my voice enabled broswer. I want to display my voice command on active window till a new window open. Is there any way I can manipulate chrome tab dom and add this command message. Source: Python..
I’m beginner in coding and try to learn webscraping with selenium, I been working on a project to check with a dictionary how long it takes to crack a password with every single word. So my code reads a .txt file that has a word on each line, then writes it to the bar and ..
I want to scrape news headlines from this link: https://www.newsnow.co.uk/h/Business+&+Finance?type=ln I want to expand news by clicking (using selenium) on the button ‘view more headlines’ to collect the max number of news headlines possible I created this code but failed to make the click to expand news : import time from selenium import webdriver u ..
Once I have located a parent element, I want to loop through it and assign each child element to a variable but only if the element contains a text. I don’t want to search for a specific text value, just any text. I am expecting the element to contain the same number of text elements ..
I’m trying to scrape email addresses from a page and having some trouble getting the parent element that contains the email ‘@’ symbol. The emails are embedded within different element tags so I’m unable to just pick them out. There’s about 50,000 or so pages that I have to go through. url = ‘https://sec.report/Document/0001078782-20-000134/#f10k123119_ex10z22.htm’ Here ..
Still new(‘ish) to Selenium but I’ve scraped a number of pages and I’m super confused as to why I can’t get this to work without timing out because it cant find the element. I’m trying to just pull and save a large amount of Reddit source pages from Web.Archive.org to run separate script on later. ..
I got the next url related to an online store https://www.tiendasjumbo.co/buscar?q=mani and I cant extract the product label an another fields: from selenium import webdriver import time from random import randint driver = webdriver.Firefox(executable_path= "C:Program Files (x86)geckodriver.exe") driver.implicitly_wait(10) time.sleep(4) url = "https://www.tiendasjumbo.co/buscar?q=mani" driver.maximize_window() driver.get(url) driver.find_element_by_xpath(‘//h1[@class="impulse-title"]’) What am I doing wrong, I also tried to switch ..