linpax.blogg.se

Script auto comment facebook imacro
Script auto comment facebook imacro










script auto comment facebook imacro script auto comment facebook imacro

Here is an example of code that signs into the Instagram and leaves a comment under a specific post: const puppeteer = require('puppeteer') Ĭonst browser = await puppeteer.launch() Īwait page.waitForSelector('input') Īwait page.type('input', 'username') Īwait page.type('input', 'password') Īwait page.click('button') This allows you to write a script which will run a browser and will act like a real user, surfing pages and leaving comments wherever you want. In order to overcome this challenge, you can use libraries that provide a high-level API to control browsers like Puppeteer. You are getting 403 error because you do not submit csrf token. Var form = document.querySelector('X7cDz') Tried add my own submit listener with return false & e.preventDefault and neither worked Submitting form expectedly refreshes page I can see in chrome dev tools there is no event event attached to this even when enabled which is odd SubmitButton.click() // doesn't fire anything. Var submitButton = document.getElementsB圜lassName('LCjcc')

script auto comment facebook imacro script auto comment facebook imacro

var commentTextArea = document.getElementsB圜lassName('Ypffh') ĬommentTextArea.textContent = "This is my comment :)" I also tried to "type" into the textarea but it seems that isn't possible without any actual user interaction on the screen as well as trying to submit the actual request (seems my headers don't match up and I'm getting a 403 error.) Below is a code snippet of what I'm currently doing. I also tried to "click" the submit button but it isn't causing it to do anything. Is there a way for me to post programmatically? I already set the textArea.value and I tried to submit the wrapping form (it just refreshes the page). I'm aware there are already solutions like InstaPy but it isn't working for me and I'm 99% complete with my own js solution. I'm creating an instagram bot that posts a comment on a user's photo.












Script auto comment facebook imacro