diff --git a/bin/make_gallery.js b/bin/make_gallery.js index 833ca7a..10e04a1 100644 --- a/bin/make_gallery.js +++ b/bin/make_gallery.js @@ -6,7 +6,13 @@ const mustache = require("mustache"); console.log('downloading tilde.town homepage...'); -axios.get('https://tilde.town/').then(function (response) { +axios.get('http://tilde.town/').then(function (response) { + if (response.status != 200) { + console.log('Chyba!'); + return 0; + } + + let userRegex = /[\w]+<\/a>/g; var users = Array.from(response.data.matchAll(userRegex), function (result) { return result[1]; @@ -32,7 +38,7 @@ axios.get('https://tilde.town/').then(function (response) { setTimeout(() => { (async () => { console.log('downloading ' + user + '...'); - await captureWebsite.file('https://tilde.town/~'+user+'/', user+'.png', { + await captureWebsite.file('http://tilde.town/~'+user+'/', user+'.png', { scaleFactor: 0.5, overwrite: true, timeout: 5