Web scrapping using loop/reply to the themes

10 Views Asked by At

I have a code that allows you to log in to the site. And I need the code to look at new topics every 5 minutes and if a new topic was created in the section, then it gives an answer in it.

const superagent = require('superagent').agent();

const login = async () => {
  let dashboard = await superagent
    .post('https://link/')
    .send({usernames: 'login', passwords: 'password'})
    .set('Content-Type', 'application/x-www-form-urlencoded');
  console.log(dashboard);
};

login();

The site's themes are as follows: https://link/forums/{number}/ And new topics like: https://link/threads/{number}/ I need the script to look at a certain section every 5 minutes and if a new topic is created, then go to it and respond for example "test" to it using: https://link/threads/{number}/reply?quote=260

who knows more about this, please help, i'm a noob in this theme

0

There are 0 best solutions below