Comments (11)
Hi @ChrisChiera I just pushed an update for the SaveSavedEntries script.
from feedly-export-save4later.
Sorry, I should have tested with more entries. 🤦 Can you try again with the latest change please?
from feedly-export-save4later.
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.
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.
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.
Just tried in Safari. Scrolled back 3 years worth (rather than 10), and also getting similar error. Hopefully that helps debug.
from feedly-export-save4later.
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.
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.
from feedly-export-save4later.
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.
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.
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)
- get more detail HOT 2
- This works in Safari on OSX too HOT 1
- sourceUrl for hacker news HOT 4
- Title field needs an update HOT 1
- TypeError HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feedly-export-save4later.