Giter Club home page Giter Club logo

Comments (11)

Barabazs avatar Barabazs commented on June 13, 2024 1

Hi @ChrisChiera I just pushed an update for the SaveSavedEntries script.

from feedly-export-save4later.

Barabazs avatar Barabazs commented on June 13, 2024 1

Sorry, I should have tested with more entries. 🤦 Can you try again with the latest change please?

from feedly-export-save4later.

TechRemarker avatar TechRemarker commented on June 13, 2024

Thanks boss! Now it downloads the data for the first/latest entry in my saved list but none of the others. Is it downloading them all for you in testing?

from feedly-export-save4later.

TechRemarker avatar TechRemarker commented on June 13, 2024

First, thank you so much. Most responsive GitHubber ever. Ran this and this time it did multiple but only for the past several months. But realized, I must have refreshed the page, and thus I hadn't scrolled to the bottom which is why that happened. So spent about 10 minutes and scrolled back all 10 years ago, and ran the script.

Getting this error:
Screenshot_20230203 _150622

That's in Chrome. I then tried opening Safari and scrolled a little bit, but not all the way at all, and it works. So I went back to Chrome in new window and scrolled all the way to bottom again, but getting same error. So seems it works, but for larger data sets getting that error. Any thoughts? Or do you think matter of emptying cache, or restarting? Since takes so long to scroll to the bottom, it's a bit hard to try different things to test.

from feedly-export-save4later.

TechRemarker avatar TechRemarker commented on June 13, 2024

Just tried in Safari. Scrolled back 3 years worth (rather than 10), and also getting similar error. Hopefully that helps debug.
Screenshot_20230203 _151249

from feedly-export-save4later.

TechRemarker avatar TechRemarker commented on June 13, 2024

By trying different things to see if I can avoid that error but so far no progress. Hopefully you have better luck!

from feedly-export-save4later.

g1sm avatar g1sm commented on June 13, 2024

Just wanted to say that I was able to save 254 items from the Saved for Later list going back 13 years with the current version of the script. I used Firefox latest. Thanks!

from feedly-export-save4later.

TechRemarker avatar TechRemarker commented on June 13, 2024

Screenshot_20230206 _090539

Same issue in latest Firefox as well. So seems same issue regardless of browser. Good to know its not related to how many years one goes back but just presumably about the number of items. That is same for low numbers such as 254, but not for large numbers.

from feedly-export-save4later.

TechRemarker avatar TechRemarker commented on June 13, 2024

To note, searching for class="EntrySummary is found 16,235 times and searching for class="EntryTitle is found 16,243 times so I have roughly 16K items if that helps. That EntrySummary is found 8 times less maybe that's triggering the bug. That for 8 entries there is no entrysummary for some reason and rather than going into the next item in the list it crashes. I'm not sure what those 8 items are but im ok with losing 8. So perhaps the code could be updated to move on if it finds an entry that has no entrysummary?

from feedly-export-save4later.

TechRemarker avatar TechRemarker commented on June 13, 2024

To help debug, updated script to remove summary: element.querySelector(".EntrySummary").innerText, and sourceTitle: element.querySelector(".EntryMetadataSource").innerText, and sourceUrl: element.querySelector(".EntryMetadataSource").href, and it runs properly. So seems of the 16k entries about 8 don't have those three classes for whatever reason, and the script then fails and doesn't keep running. So presumably just needs to be updated to keep running it those classes are not found. Will keep testing on my end to see if can somehow programatically determine which of the 8 are missing (and delete them), or add logic to keep it running if it doesn't find them.

from feedly-export-save4later.

TechRemarker avatar TechRemarker commented on June 13, 2024

Here is an updated version that lets it keep running if it can't find those three items that worked for me.

`let convertEntries = () => {
"use strict";
let target = [...document.getElementsByClassName("entry")];
let result = [];
target.forEach((element) => {
let regExpLiteral = /Published:.(.*)/i;
let title = element.querySelector(".EntryTitle") ? element.querySelector(".EntryTitle").innerText : "";
let url = element.querySelector("a:not(.EntryMetadataSource)") ? element.querySelector("a:not(.EntryMetadataSource)").href : "";
let summary = element.querySelector(".EntrySummary") ? element.querySelector(".EntrySummary").innerText : "";
let time = regExpLiteral.exec(element.querySelector("span.ago").title) ? regExpLiteral.exec(element.querySelector("span.ago").title)[1] : "";
let sourceTitle = element.querySelector(".EntryMetadataSource") ? element.querySelector(".EntryMetadataSource").innerText : "";
let sourceUrl = element.querySelector(".EntryMetadataSource") ? element.querySelector(".EntryMetadataSource").href : "";
result.push({
title: title,
url: url,
summary: summary,
time: time,
sourceTitle: sourceTitle,
sourceUrl: sourceUrl,
});
});
return result;
};

let saveToFile = (input) => {
"use strict";
let json = JSON.stringify(input, undefined, 2);
let blob = new Blob([json], { type: "text/plain;charset=utf-8" });
let downloadLink = document.createElement("a");
downloadLink.href = URL.createObjectURL(blob);
let fileName = "FeedlySavedForLater" + Date.now().toString() + ".json";
downloadLink.download = fileName;
downloadLink.click();
URL.revokeObjectURL(blob);
};

saveToFile(convertEntries());`

from feedly-export-save4later.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.