Better HN
topnewbestaskshowjobs
Log inSign up

ewfwrfw

9 karma · joined Feb 20, 2016 (10y ago) · 7 submissions

Submissions

comment 10y ago · link · parent

Right, I tried that first but I couldn't actually get it to return any data. I think I was screwing up the request headers. Now though I remembered the Firebug "copy as cURL" thing and it's working, so yeah, definitely a better way to do it.

comment 10y ago · link · parent

Cool! Yeah, I like having enormous lists of color palettes for doing algorithmic art. I will definitely hit up the colr API and the colourlovers one posted above too.

comment 10y ago · link · parent

I inserted some JS code via the console that scrolls to the bottom of the page whenever the 'collection-assets' div changed, waited, ran observer.disconnect() as my browser was crashing to a halt, and then saved the HTML and combed through it with regexes.

    var target = document.querySelector('.collection-assets');

    var observer = new MutationObserver(function() {
      window.scrollTo(0,document.body.scrollHeight);
    });

    var config = { childList: true };

    observer.observe(target, config);

comment 10y ago · link · parent

That is awesome! I can't believe I haven't seen it before.

The API is undocumented and restricted it seems, but I did manage to get the first 5000 or so color palettes before my browser crashed:

http://pasted.co/38096f65

comment 10y ago · link · parent

Really?

FB just took 13 seconds for me to load fully! HN took only a second. I suspect the situation would be way worse if the browser cache was cleared too.