Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var images = [];
- function getPhoto() {
- var img = document.querySelector('.spotlight');
- console.log(images.length, img.src);
- var hasImage = images.indexOf(img.src) !== -1
- if (!hasImage) {
- images.push(img.src);
- var currentSrc = img.src;
- document.querySelector('.snowliftPager.next').click();
- var interval = setInterval(function() {
- var loading = document.querySelector('.spotlight');
- if (loading.src !== currentSrc && loading.complete) {
- clearInterval(interval);
- getPhoto();
- }
- }, 100);
- } else {
- console.log('all done');
- window.wget = images.map(function(image) {
- return 'wget --no-check-certificate "' + image + '"';
- });
- window.wget.map(function(line) {console.log(line); });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement