Puppeteer

puppeteer being redirected when browser is not

天大地大妈咪最大 提交于 2021-02-11 14:20:55
问题 Attempting to test page https://publicindex.sccourts.org/anderson/publicindex/ When navigating with standard browser to the page, the navigation ends at the requested page (https://publicindex.sccourts.org/anderson/publicindex/) with the page displaying an "accept" button. However, when testing with puppeteer in headless mode, the request is redirected to https://publicindex.sccourts.org. I have a rough idea of what is occuring, but can not seem to prevent the redirection to https:/

Trouble with generating PDF file to upload to firebase

房东的猫 提交于 2021-02-11 13:11:15
问题 I'm learning about puppeteer and firebase at the moment. What I am trying to do is create a pdf of a web page and upload to firebase storage. This is my code. const puppeteer = require('puppeteer'); const fs = require('fs').promises; const firebase = require('firebase'); require("firebase/storage"); const url = process.argv[2]; if (!url) { throw "Please provide URL as a first argument"; } var firebaseConfig = { #Firebase Config Goes here }; // Initialize Firebase firebase.initializeApp

How do I click a button that has no ID using (Apify's) Puppeteer?

泪湿孤枕 提交于 2021-02-11 12:26:52
问题 I am using Apify's puppeteer to login to this website. I did research similar questions but to no avail. I am having trouble finding the clickable id/element for the main Login button seen on the linked login page. Currently, my code reads like this: const Apify = require('apify'); Apify.main(async () => { const input = await Apify.getValue('INPUT'); const browser = await Apify.launchPuppeteer(); const page = await browser.newPage(); await page.goto('https://www.sunpass.com/vector/account

How do I click a button that has no ID using (Apify's) Puppeteer?

荒凉一梦 提交于 2021-02-11 12:25:45
问题 I am using Apify's puppeteer to login to this website. I did research similar questions but to no avail. I am having trouble finding the clickable id/element for the main Login button seen on the linked login page. Currently, my code reads like this: const Apify = require('apify'); Apify.main(async () => { const input = await Apify.getValue('INPUT'); const browser = await Apify.launchPuppeteer(); const page = await browser.newPage(); await page.goto('https://www.sunpass.com/vector/account

Leave a comment to post in facebook with puppteer [closed]

此生再无相见时 提交于 2021-02-11 12:20:34
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 days ago . Improve this question I need help please I try to leave a comment on posts using PUPPETEER, I can find the post but I can not respond to the same post. it finds me all the posts and it's not good for me, basically what I want to do is: SCROLL DOWN Search for a post Respond to him

How to load script in puppeteer?

蓝咒 提交于 2021-02-10 16:08:16
问题 I'm trying to load axios in chromium using puppeteer, the code is as follows: const puppeteer = require('puppeteer'); (async () => { const browser = await puppeteer.launch({headless:false}) const page = await browser.newPage() await page.goto('https://httpbin.org/get') await page.evaluate(async () => { var script = document.createElement('script'); script.setAttribute('src','https://unpkg.com/axios@0.21.0/dist/axios.min.js'); document.head.appendChild(script); var r = await axios.get('https:/

How to load script in puppeteer?

亡梦爱人 提交于 2021-02-10 16:00:47
问题 I'm trying to load axios in chromium using puppeteer, the code is as follows: const puppeteer = require('puppeteer'); (async () => { const browser = await puppeteer.launch({headless:false}) const page = await browser.newPage() await page.goto('https://httpbin.org/get') await page.evaluate(async () => { var script = document.createElement('script'); script.setAttribute('src','https://unpkg.com/axios@0.21.0/dist/axios.min.js'); document.head.appendChild(script); var r = await axios.get('https:/

How to load script in puppeteer?

两盒软妹~` 提交于 2021-02-10 16:00:04
问题 I'm trying to load axios in chromium using puppeteer, the code is as follows: const puppeteer = require('puppeteer'); (async () => { const browser = await puppeteer.launch({headless:false}) const page = await browser.newPage() await page.goto('https://httpbin.org/get') await page.evaluate(async () => { var script = document.createElement('script'); script.setAttribute('src','https://unpkg.com/axios@0.21.0/dist/axios.min.js'); document.head.appendChild(script); var r = await axios.get('https:/

How to select all child div with same class using Puppeteer?

时间秒杀一切 提交于 2021-02-10 13:58:08
问题 I'm new for Puppeteer and I'm trying to get textContent from two divs that using same class. <div class="post-item"> <div class="post-item-info"> <span class="post-item-status post-comment"></span> 3 </div> <div class="post-item-info"> <span class="post-item-status post-vote"></span> 5 </div> </div> The result that I'm expecting is return an array [3,5]. My current code is below. let postInfo = element.querySelector('.post-item-info'); The problem is it is only return the first one. Please

How to select all child div with same class using Puppeteer?

别说谁变了你拦得住时间么 提交于 2021-02-10 13:57:30
问题 I'm new for Puppeteer and I'm trying to get textContent from two divs that using same class. <div class="post-item"> <div class="post-item-info"> <span class="post-item-status post-comment"></span> 3 </div> <div class="post-item-info"> <span class="post-item-status post-vote"></span> 5 </div> </div> The result that I'm expecting is return an array [3,5]. My current code is below. let postInfo = element.querySelector('.post-item-info'); The problem is it is only return the first one. Please