Forum

Power Query stops d...
 
Notifications
Clear all

Power Query stops during data scraping if a web page does not have the expected table

2 Posts
2 Users
0 Reactions
67 Views
(@jbd)
Posts: 4
Active Member
Topic starter
 

Hi,

I created a query to scrape product prices from Google shopping table for a list of products. I turned the query into a function as per your Eysenck example (23/5/19 Newsletter - but using Power Query via Excel rather than Power BI). This operation works ok, but I have 2 problems:

1. If a particular product has no sellers on Google currently there is no table for the query to grab and transform. At that point it just stops. Is there an error handling capability that will allow me to skip over that product in these circumstances and carry on?

2. I don't seem to be able to work out how the load the result back into a spreadsheet. When I click Close & Load the option to load it to a workbook is greyed out. Sorry I'm sure this must be very simple - just can't see it!

I have attached the workbook with a small number of product codes included. The query stops when it gets to product code 11795149487382413503 at

https://www.google.co.uk/shopping/product/11795149487382413503

I am on Windows 10, Office 365.

I hope that gives you the information you need - your assistance would be much approeciated.

Thank you,

Jim

Liverpool, UK

 
Posted : 14/05/2020 12:17 pm
(@mynda)
Posts: 4762
Member Admin
 

Hi Jim,

Session 6.11 of the Power query course covers error handling. For some pointers on how you might use it in your code, please see this example.

I hope that points you in the right direction.

Mynda

 
Posted : 14/05/2020 8:04 pm
Share: