From a6d6728303b12c4602281d54f027bdbe48aabb7a Mon Sep 17 00:00:00 2001 From: Gabriel Dunne Date: Sat, 6 Apr 2013 17:40:38 -0700 Subject: [PATCH] Added thumbscraper for image frames --- scripts/thumb_scrape_config.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 scripts/thumb_scrape_config.js diff --git a/scripts/thumb_scrape_config.js b/scripts/thumb_scrape_config.js new file mode 100644 index 0000000..72537bb --- /dev/null +++ b/scripts/thumb_scrape_config.js @@ -0,0 +1,30 @@ +var urls = [ + 'http://archive.org/movies/thumbnails.php?identifier=0924_Greatest_Name_in_Wine_The_11_00_13_15' +]; + +pjs.config({ + timeoutInterval: 5000, + timeoutLimit: 10000, + format: 'json', + writer: 'file', + outFile: 'scrape_output.json', + pageSettings : { loadImages : false } +}); + +pjs.addSuite({ + url: urls, + scrapers: [ + function() { + var r = {}; + var thumbnail_links = $('.box div a').map(function() { + return { + img: $('img', this).attr('src'), + link: $(this).attr('href') + } + }).toArray(); + r['url'] = window.location.href; + r['thumbnails'] = thumbnail_links; + return r; + } +] +}); -- 2.34.1