If you are a regular seller on Souq.com, then you know there is nothing more important than keeping a tab on the competition prices, and adjusting your prices accordingly. of
What if I could show you a way to keep all the data you want in a spreadsheet. Say your costing, lowest price you are willing to sell, and current lowest price available on souq. Something like this sheet
If this looks
We are going to use
1. Get the URL which shows Top offers for your product.
This is the top offer page for Apple iPhone X which shows
2. Get the
Souq Displays the price in a Div with a Class called ‘field price-field‘. You want the text that’s contained in this div. Further, you want only the first record.
The Xpath for this would be
Similarly Xpath for Seller name would be
These are the Xpaths you see in the fields G and H.
3. Use google Sheets
There you have it, a single sheet that captures all the information you need to successfully keep a tab on your competition
Consider the following when you use this approach
1. Google sheets only allow you to have around 50-70 importXML calls per sheet. So you can’t put 500 products there and fetch the data for all. If you wish to do that, you could use python for scraping. I use python with Selenium to scrape souq whenever I need to scrape more than 100 items
2. If you can live with a slower solution, you can use
2. Xpath I have used will change as Souq changes their website structure. anytime you get an error, inspect the document and see if the structure of the page has changed.