Reputation:
could you please give me an idea about how I can get thi
Upvotes: 0
Views: 460
Reputation: 5915
A workaround. You can import the data with the following script (credits to Brad Jasper) : ImportJSON, then request with QUERY
formula. This is an example with "iPhone 8" and "Playstation 4".
In column A, you write the product to search. The url to get the JSON data is automatically build in column B with a concat operator.
="https://wss2.cex.uk.webuy.io/v3/boxes?q="&A2
In column C, you have the QUERY
formula combined with the ImportJSON
data step.
=QUERY(ImportJSON(B2);"SELECT Col4,Col20 WHERE Col4 CONTAINS 'Plus' AND Col4 CONTAINS '64' AND Col4 CONTAINS 'Unlocked' LIMIT 1 label Col4'',Col20''";1)
Col4
: product description, Col20
: price of the product. Since the JSON will return a lot of results (multiple iPhone 8 versions), this is the step where you can refine your search. I've searched for "Plus","64" and "Unlocked" in the product description.
Upvotes: 0
Reputation: 7783
Many sites go to great lengths to actively prevent scraping. Giving you just the data you want entirely undermines their business model. If you're a consumer, they're denied the chance to show you advertising. If you're a reseller, you can use fairly simple programming and marketing to undercut their prices.
If you find yourself unable to scrape, it may be because it's not going to be possible.
Upvotes: 1
Reputation: 1
unfortunately, that won't be possible because the site is controlled by JavaScript and Google Sheets can't understand/import JS. you can test this simply by disabling JS for a given link and you will see a blank page:
Upvotes: 0