0
votes

Google photos forum has been replaced with Google Photos Community and I finally can use Importxml to pull up data from it.

URL: https://support.google.com/photos/thread/135168

xpath : //*[@class="thread-all-replies__message"]

For some reason, Importxml function is returning only 5 results from this thread whereas this thread has total 18 replies as of today.

What am I doing wrong or missing?

1
Check if the XHTML is well formed and that the source code include all the results that you expect. - Rubén
I figured it out. For anyone who is looking for it, you can use the RSS Feed to push data to Spreadsheet. Here's the code: - Ken Adams
function test() { var sheet = SpreadsheetApp.openById("KEY").getSheetByName('Agent Work Space'); var temp = sheet.getRange(1, 6, sheet.getLastRow()).getValues(); var existingIds = []; for (var i in temp) { existingIds.push(temp[i][0]); } var feed = UrlFetchApp.fetch("RSS Link").getContentText(); feed = XmlService.parse(feed); var items = feed.getRootElement().getChild("channel").getChildren("item"); for (var i in items) { var link = items[i].getChild("link").getValue(); if (existingIds.indexOf(link) != -1) continue; sheet.appendRow([]););}} - Ken Adams
Please add you solution as an answer. Comments are intended to be temporary. Ref. Can I answer my own question?. - Rubén

1 Answers

-2
votes
function test() { var sheet = SpreadsheetApp.openById("KEY").getSheetByName('Agent Work Space'); var temp = sheet.getRange(1, 6, sheet.getLastRow()).getValues(); var existingIds = []; for (var i in temp) { existingIds.push(temp[i][0]); } var feed = UrlFetchApp.fetch("RSS Link").getContentText(); feed = XmlService.parse(feed); var items = feed.getRootElement().getChild("channel").getChildren("item"); for (var i in items) { var link = items[i].getChild("link").getValue(); if (existingIds.indexOf(link) != -1) continue; sheet.appendRow([]););}}