-1

I am trying to get the product's seller yet it will not get the text. I assume this is some weird thing since the text is also a link. Any help?

Python Code:

self.sold_by = driver.find_element_by_css_selector('#sellerProfileTriggerId').text

HTML Element:

<a href="/gp/help/seller/at-a-glance.html/ref=dp_merchant_link?ie=UTF8&amp;seller=A2IEDZAWBB03ZE&amp;isAmazonFulfilled=1" id="sellerProfileTriggerId">SKUniverse</a>
2
  • think this might be helpful stackoverflow.com/questions/17251658/… Commented Jun 28, 2021 at 4:19
  • The mentioned element is with Id, I would suggest to use self.sold_by = driver.find_element_by_id('sellerProfileTriggerId') Commented Jun 28, 2021 at 7:09

1 Answer 1

0

Try like this:

self.sold_by = driver.find_element_by_css_selector('#sellerProfileTriggerId')
text_element=self.sold_by.text
print(text_element)

Also, why aren't you using xpath or id selectors! Just asking :)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.