Reputation:
I have been trying to get a details of a website https://uniworthshop.com/shirts.
I am looking for the information are "shirt Name", "Prices" but do not know how to add further to get the prices via import function.
Here is the sheet link. https://docs.google.com/spreadsheets/d/1ZCrQlBjfMmO9636npMth9ErDr4kSnK8LhKb7JXS2KxU/edit#gid=0
can someone please guide or share a script to do this thing.
Upvotes: 0
Views: 74
Reputation: 2037
you can do the following:
=IMPORTXML("https://uniworthshop.com/shirts","//div[starts-with(@class, 'product-name')]")
=IMPORTXML("https://uniworthshop.com/shirts","//div[@class='product-price']")
Upvotes: 2
Reputation: 638
By checking that page source html, it seems that <div class="product-name">
and <div class="product-price">
are the two tags holding the information you need. Your best course would be to use Selenium, in this case with Python, and extract innerText from those two tags by searching elements by class, or you could just use requests module to get the full html and subsequently parse it with BeautifulSoup or something else.
Upvotes: 0