Update index.js
Browse files
index.js
CHANGED
@@ -7,6 +7,89 @@ const moment = require('moment-timezone');
|
|
7 |
// 添加24小时访问的URL数组
|
8 |
const urls = [
|
9 |
// 此处可备注名称,例如:H080
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
'https://www.yahoo.com', // 此处可备注名称,例如:glitch
|
11 |
'https://www.baidu.com', // 此处可备注名称,例如:glitch
|
12 |
'https://www.yahoo.com', // 此处可备注名称,例如:glitch
|
@@ -128,9 +211,9 @@ function checkAndSetTimer() {
|
|
128 |
const currentMoment = moment().tz('Asia/Hong_Kong');
|
129 |
const formattedTime = currentMoment.format('YYYY-MM-DD HH:mm:ss');
|
130 |
if (currentMoment.hours() >= 1 && currentMoment.hours() < 5) {
|
131 |
-
console.log(`Stop visit from 1:00 to
|
132 |
clearInterval(visitIntervalId); // 清除定时器
|
133 |
-
const nextVisitTime = moment().tz('Asia/Hong_Kong').add(0, 'day').hours(
|
134 |
const nextVisitInterval = nextVisitTime.diff(currentMoment);
|
135 |
setTimeout(() => {
|
136 |
startVisits();
|
|
|
7 |
// 添加24小时访问的URL数组
|
8 |
const urls = [
|
9 |
// 此处可备注名称,例如:H080
|
10 |
+
|
11 |
+
'https://instinctive-night-gruyere.glitch.me',
|
12 |
+
'https://rattle-simple-fog.glitch.me',
|
13 |
+
'https://oasis-cheddar-change.glitch.me',
|
14 |
+
'https://lofty-glacier-coconut.glitch.me',
|
15 |
+
'https://working-splendid-nigella.glitch.me',
|
16 |
+
'https://peppermint-sticky-magnesium.glitch.me',
|
17 |
+
'https://butter-ultra-grandparent.glitch.me',
|
18 |
+
'https://cubic-dashing-pyjama.glitch.me',
|
19 |
+
'https://creative-clover-cerise.glitch.me',
|
20 |
+
'https://northern-scythe-celestite.glitch.me',
|
21 |
+
'https://shorthaired-rowan-jade.glitch.me',
|
22 |
+
'https://sleepy-knowing-neem.glitch.me',
|
23 |
+
'https://hot-relieved-galleon.glitch.me',
|
24 |
+
'https://stingy-ionian-eggplant.glitch.me',
|
25 |
+
'https://rainbow-laced-sandwich.glitch.me',
|
26 |
+
'https://bouncy-round-aspen.glitch.me',
|
27 |
+
'https://illustrious-little-can.glitch.me',
|
28 |
+
'https://sneaky-available-force.glitch.me',
|
29 |
+
'https://quasar-square-route.glitch.me',
|
30 |
+
'https://rattle-valiant-milkshake.glitch.me',
|
31 |
+
'https://guttural-burly-sceptre.glitch.me',
|
32 |
+
'https://encouraging-boiling-blouse.glitch.me',
|
33 |
+
'https://abstracted-available-queen.glitch.me',
|
34 |
+
'https://caring-darkened-okra.glitch.me',
|
35 |
+
'https://honored-verbena-taurus.glitch.me',
|
36 |
+
'https://concrete-imaginary-worm.glitch.me',
|
37 |
+
'https://numerous-nice-polyester.glitch.me',
|
38 |
+
'https://lead-chiseled-parrot.glitch.me',
|
39 |
+
'https://invented-spiffy-centipede.glitch.me',
|
40 |
+
'https://admitted-adjoining-botany.glitch.me',
|
41 |
+
'https://successful-rift-show.glitch.me',
|
42 |
+
'https://iced-abundant-punishment.glitch.me',
|
43 |
+
'https://deciduous-bubbly-bag.glitch.me',
|
44 |
+
'https://fine-continuous-neighbor.glitch.me',
|
45 |
+
'https://fanatical-young-cork.glitch.me',
|
46 |
+
'https://translucent-magnificent-quicksand.glitch.me',
|
47 |
+
'https://dazzling-near-contraption.glitch.me',
|
48 |
+
'https://spiky-curly-salto.glitch.me',
|
49 |
+
'https://standing-elated-trader.glitch.me',
|
50 |
+
'https://voltaic-sequoia-alfalfa.glitch.me',
|
51 |
+
'https://eminent-remarkable-lawyer.glitch.me',
|
52 |
+
'https://impartial-hushed-butterfly.glitch.me',
|
53 |
+
'https://hexagonal-reflective-toast.glitch.me',
|
54 |
+
'https://muddy-nasal-gasosaurus.glitch.me',
|
55 |
+
'https://butternut-trail-market.glitch.me',
|
56 |
+
'https://jungle-cooked-foam.glitch.me',
|
57 |
+
'https://whimsical-locrian-baroness.glitch.me',
|
58 |
+
'https://early-thundering-brake.glitch.me',
|
59 |
+
'https://butter-husky-year.glitch.me',
|
60 |
+
'https://bolder-bush-wok.glitch.me',
|
61 |
+
'https://solar-mewing-clave.glitch.me',
|
62 |
+
'https://trite-mountainous-pirate.glitch.me',
|
63 |
+
'https://mica-light-paper.glitch.me',
|
64 |
+
'https://lyrical-spiral-anaconda.glitch.me',
|
65 |
+
'https://skinny-difficult-hoodie.glitch.me',
|
66 |
+
'https://stormy-misty-space.glitch.me',
|
67 |
+
'https://shorthaired-alpine-liver.glitch.me',
|
68 |
+
'https://flaxen-impartial-huckleberry.glitch.me',
|
69 |
+
'https://cliff-cheddar-ton.glitch.me',
|
70 |
+
'https://enchanted-brief-waxflower.glitch.me',
|
71 |
+
'https://stealth-sugar-scorpion.glitch.me',
|
72 |
+
'https://ruddy-bow-wormhole.glitch.me',
|
73 |
+
'https://shrouded-bustling-respect.glitch.me',
|
74 |
+
'https://unleashed-capricious-respect.glitch.me',
|
75 |
+
'https://solstice-habitual-tenor.glitch.me',
|
76 |
+
'https://surf-stingy-mailman.glitch.me',
|
77 |
+
'https://thoracic-locrian-mask.glitch.me',
|
78 |
+
'https://impartial-defiant-hockey.glitch.me',
|
79 |
+
'https://past-subsequent-error.glitch.me',
|
80 |
+
'https://respected-efficacious-prince.glitch.me',
|
81 |
+
'https://noiseless-ash-reaction.glitch.me',
|
82 |
+
'https://sharp-changeable-viscount.glitch.me',
|
83 |
+
'https://handy-harmonious-utensil.glitch.me',
|
84 |
+
'https://rapid-lacy-mile.glitch.me',
|
85 |
+
'https://material-lopsided-carver.glitch.me',
|
86 |
+
'https://helix-angry-stew.glitch.me',
|
87 |
+
'https://wooded-creative-crime.glitch.me',
|
88 |
+
'https://glow-low-gastonia.glitch.me',
|
89 |
+
'https://easy-holly-copper.glitch.me',
|
90 |
+
'https://indecisive-helix-toad.glitch.me',
|
91 |
+
|
92 |
+
|
93 |
'https://www.yahoo.com', // 此处可备注名称,例如:glitch
|
94 |
'https://www.baidu.com', // 此处可备注名称,例如:glitch
|
95 |
'https://www.yahoo.com', // 此处可备注名称,例如:glitch
|
|
|
211 |
const currentMoment = moment().tz('Asia/Hong_Kong');
|
212 |
const formattedTime = currentMoment.format('YYYY-MM-DD HH:mm:ss');
|
213 |
if (currentMoment.hours() >= 1 && currentMoment.hours() < 5) {
|
214 |
+
console.log(`Stop visit from 1:00 to 8:00 --- ${moment().tz('Asia/Hong_Kong').format('YYYY-MM-DD HH:mm:ss')}`);
|
215 |
clearInterval(visitIntervalId); // 清除定时器
|
216 |
+
const nextVisitTime = moment().tz('Asia/Hong_Kong').add(0, 'day').hours(8).minutes(0).seconds(0);
|
217 |
const nextVisitInterval = nextVisitTime.diff(currentMoment);
|
218 |
setTimeout(() => {
|
219 |
startVisits();
|