In How to flag dozens of almost identical answers I have mentioned that I have found dozens of "bad" questions from people having problems importing content from dynamic websites using IMPORTHTML / IMPORTXML Google Sheets functions having almost identical answers saying:
It's not possible by using Google Sheets formulas.
As google-sheets gold tag badge holder I have being closing some of these bad questions as duplicate of Scraping data to Google Sheets from a website that uses JavaScript that was posted at the end of October 2022 and answered by me the next day and by another user one month after.
I have being looking for a better target to be used as the canonical question. Suggestions are welcome either to improve my answer or to use another question as the duplicate target.
Searches for related questions
- [google-sheets] import*ml is:question duplicate:0 returns 1,567 questions.
- [google-sheets] import*ml is:question error duplicate:0 returns 437 questions.
- [google-sheets] import*ml is:question N/A duplicate:0 returns 181 questions.
- [google-sheets] import*ml is:question "content is empty" duplicate:0 returns 142 questions.
- These results overlaps with the previous results.
- Update: I have found that the URL to be web scraped on several old questions are broken / no longer available and the answers are "too localized" (apparently do not offer any value for future readers / have 0 score = 0 upvotes + 0 downvotes). Voting to close these questions using a custom reason and downvoting.
Yahoo Finance
- finance.yahoo.com [google-sheets] duplicate:0 returns 78 questions
- url:finance.yahoo.com [google-sheets] duplicate:0 returns 32 questions
Searches for related answers
- [google-sheets] import*ml is:answer returns 1,256 answers.
- [google-sheets] import*ml is:answer javascript returns 170 answers.
- [google-sheets] import*ml is:answer dynamic -javascript returns 27 results.
- -[google-sheets] google-sheets import*ml is:answer returns 36 answers
Another common problem is trying to import content using IMPORTXML
from websites that don't follow the XML rules. While the cause of the problem is different, the OP of "bad" questions might be benefit of being pointed to the same duplicate target as the web scraping foundations and the alternatives might be the same.
Searches for related questions
- [google-sheets] "Could not fetch url" is:question duplicate:0 returns 44 results
- One solution might be to use a custom function instead of built-in functions as this gives more flexibility for handling the HTTP response, i.e. instead of using XML or HTML parsing methods it could be possible to use string parsing methods like regular expressions.
- [google-sheets] "Imported XML content can not be parsed" is:question duplicate:0 returns 16 results
- "Resource at url contents exceeded maximum size" is:question duplicate:0 returns 8 questions
Related