Chytame chyby, pouzivame http.
parent
bd224a3b9e
commit
4b6ecc708a
|
@ -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 = /<a href="\/~(\w+)">[\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
|
||||
|
|
Loading…
Reference in New Issue