I am trying to web scrape using selenium in Python. I find all the links on the webpage using
elems = self.driver.find_elements_by_xpath("//a[@href]")
Below are the attributes of the individual links from the list above.
URL 1:
{u'href': u'/video/ca02339f-f8b3-4c34-a34c-5cb317b4618b/fda2decb-2d6c-4d48-9535-7362381688b3', u'_ngcontent-c15': u'', u'class': u'slider-item'}
URL 2:
{u'href': u'/video/ca02339f-f8b3-4c34-a34c-5cb317b4618b/cdc7f553-e176-49ff-a8a5-d7413dfef534', u'_ngcontent-c15': u'', u'class': u'slider-item'}
URL 3:
{u'href': u'/video/ca02339f-f8b3-4c34-a34c-5cb317b4618b/710a09a8-6c59-4195-9f1d-991b7807ec94', u'_ngcontent-c15': u'', u'class': u'slider-item'}
URL 4:
{u'href': u'/video/ca02339f-f8b3-4c34-a34c-5cb317b4618b/9659cf42-35b5-4e48-9a86-3cb2e97ed8bd', u'_ngcontent-c15': u'', u'class': u'slider-item'}
I would like to click one of the href link. There are no link texts associated with the links. Is there a way to click just the link without any other information. I could not find any information regarding following stand-alone links without any meta info.
self.driver.get(url)
not do what you want?