Search code examples
google-sheetsweb-scrapinggoogle-finance

Debugging ImportHTML


I'm trying to create a dividend tracker in Google Sheets using the ImportHTML function.

This URL: https://www.google.com/finance?q=VZ works fine in the browser, but gets an error in ImportHTML claiming that it cannot fetch the URL (that just worked.)

This is the way I'm using the function:

=IMPORTHTML("https://www.google.com/finance?q=VZ","table",3)

I got the number 3 from various online resources, and I'm able to import other kinds of URLs.

Any idea what I'm doing wrong?


Solution

  • Their robots.txt file includes:

    Disallow: /finance?*q=*
    

    In other words, you are not doing anything wrong.