Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save ShockwaveNN/a0baf2ca26d1711f10e2 to your computer and use it in GitHub Desktop.
Save ShockwaveNN/a0baf2ca26d1711f10e2 to your computer and use it in GitHub Desktop.
Working script for latest feedly redising. Drop support of `time` field, no longer avaible (or I din't found it)
// Simple script that exports a users "Saved For Later" list out of Feedly
// as a JSON string.
//
// This was intended for use in the Google Chrome's "Inspector" tool so your
// mileage may vary if used in other contexts.
//
// Format of JSON is as follows:
// [
// {
// title: "Title",
// url: "www.example.com/title",
// time: "Sunday "
// }
// ]
//
// How to use:
// 1) Open up Google Chrome
// 2) Login to Feedly and go to the "Saved For Later" list.
// 3) Keep scrolling down the page until all saved documents have been loaded
// 4) Right click on the page and select "Inspect Element"
// 5) Inside the "Inspector" tool, click the "Console" tab.
// 6) Paste the script below into the console
//
// NOTE: You must switch off SSL (http rather than https) or jQuery won't load!
// Feedly doesn't use jQuery so firstly inject it into the page
function loadJQuery(){
script = document.createElement('script');
script.setAttribute('src', '//code.jquery.com/jquery-2.1.3.js');
script.setAttribute('type', 'text/javascript');
script.onload = loadSaveAs;
document.getElementsByTagName('head')[0].appendChild(script);
}
function loadSaveAs(){
saveAsScript = document.createElement('script');
saveAsScript.setAttribute('src', 'https://rawgit.com/eligrey/FileSaver.js/master/FileSaver.js');
saveAsScript.setAttribute('type', 'text/javascript');
saveAsScript.onload = saveToFile;
document.getElementsByTagName('head')[0].appendChild(saveAsScript);
}
function saveToFile() {
// Loop through the DOM, grabbing the information from each bookmark
map = jQuery(".entry.quicklisted").map(function(i, el) {
var $el = jQuery(el);
var regex = /published:(.*)\ --/i;
return {
title: $el.attr("data-title"),
url: $el.attr("data-alternate-link")
};
}).get(); // Convert jQuery object into an array
// Convert to a nicely indented JSON string
json = JSON.stringify(map, undefined, 2);
var blob = new Blob([json], {type: "text/plain;charset=utf-8"});
saveAs(blob, "FeedlySavedForLater" + Date.now().toString() + ".txt");
}
loadJQuery()
@Dexnero
Copy link

Dexnero commented May 24, 2017

published: regex.exec($el.find("span.ago").attr("title"))[1]

There's the time attribute. Thanks for fixing the script! I searched forever for a working script...

@kaktux
Copy link

kaktux commented Oct 7, 2018

gives error:

VM129:41 GET https://rawgit.com/eligrey/FileSaver.js/master/FileSaver.js net::ERR_ABORTED 404
loadSaveAs @ VM129:41
load (async)
loadJQuery @ VM129:32
(anonymous) @ VM129:61
saved:1 Refused to execute script from 'https://rawgit.com/eligrey/FileSaver.js/master/FileSaver.js' because its MIME type ('') is not executable, and strict MIME type checking is enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment