Skip to content Skip to sidebar Skip to footer

I Am Unable To Scrape Each Link Content For Specific Time Period From Indeed

I am new to python and web scraping. Your help will be appreciated. I am newbie in programming and practicing . i am using python and selenium for web scraping I am trying to scrap

Solution 1:

Problem is you get the href, go to the page, scrape it and say give me the next href but now see, you can't find it anymore because you are on a different page.

Answer : Scrape all urls and put them in a list. Iterate the list and one by one go on each of them scrape it and choose next element from that list.

Solution 2:

I think you're running the loop in the wrong place, that's why you're getting only 1 link.

try:
        title = div.find_element_by_class_name("title")
        anchors = title.find_elements_by_tag_name('a')
        links = []
        for anchor in anchors:
            link = anchor.get_attribute('href')
            links.append(link)
        print(links)
        for link in links:
            url = driver.get(link)

I don't use selenium, but I am good with web scraping topic. Can please tell me what you're trying to do in the links lists loop ?

forlinkin links:
            url = driver.get(link)

Post a Comment for "I Am Unable To Scrape Each Link Content For Specific Time Period From Indeed"