try-puppeteer | Run Puppeteer code in the cloud | Automation library

 by   ebidel JavaScript Version: Current License: Apache-2.0

kandi X-RAY | try-puppeteer Summary

kandi X-RAY | try-puppeteer Summary

try-puppeteer is a JavaScript library typically used in Automation, Nodejs, Docker applications. try-puppeteer has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Run Puppeteer scripts in the cloud.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              try-puppeteer has a low active ecosystem.
              It has 719 star(s) with 122 fork(s). There are 18 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 21 open issues and 29 have been closed. On average issues are closed in 27 days. There are 11 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of try-puppeteer is current.

            kandi-Quality Quality

              try-puppeteer has no bugs reported.

            kandi-Security Security

              try-puppeteer has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              try-puppeteer is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              try-puppeteer releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of try-puppeteer
            Get all kandi verified functions for this library.

            try-puppeteer Key Features

            No Key Features are available at this moment for try-puppeteer.

            try-puppeteer Examples and Code Snippets

            No Code Snippets are available at this moment for try-puppeteer.

            Community Discussions

            QUESTION

            How to do a web scraping using Puppeteer and publish it?
            Asked 2020-Nov-20 at 15:04

            I would like to do a web-scraping using Puppeteer. It would be to obtain data from an external URL when the user clicks a button within my application. My application would have to visit an external URL, fill out a form, click on a button, get the data returned and display it to the user within my application. It is an internal project, at first, a small project.

            I wrote a test code to use Puppeteer using the website: https://try-puppeteer.appspot.com/

            Worked perfectly. Great!

            1. However, I was unable to get my code to run on my domain with shared hosting on Locaweb. It seems to me that I depend on changes on the server to be able to run Puppeteer, is that right?

            2. Is there a free place where I can host my code and run with Puppeteer like I did at https://try-puppeteer.appspot.com/? If you don't have a free option to suggest, could you suggest a low cost option that works?

            Thank you!

            ...

            ANSWER

            Answered 2020-Nov-20 at 14:11

            Steps:

            1. You would need to create a simple expressjs api.
            2. Host the api somewhere (there are thousands of vps and cloud hosting providers like digitalocean/linode etc.)
            3. Access that rest api using frontend (typically an ajax call)

            There is indeed some free services, but they would be a bit more complex. You would need to learn about some serverless functions. Try searching for,

            • AWS lambda
            • Netlify functions
            • Firebase functions
            • Google cloud functions
            • Google cloud run.

            Source https://stackoverflow.com/questions/64928703

            QUESTION

            Loop thru array of Puppeteer elements and further parse each one
            Asked 2020-May-10 at 07:23

            Aw man, I have been trying to work with this for a long time and I'm so stuck.

            I need to walk a series of DOM objects, and extract info from each using XPath selectors. My source HTML does not have any identifying IDs or classes on its elements so there's a lot of walking.

            Here's some (very simplified) sample code. The goal is to get a list of LI elements, then use more selectors on each of the elements to extract the names inside the spans.

            Simplified sample code: (https://try-puppeteer.appspot.com/)

            ...

            ANSWER

            Answered 2020-May-10 at 07:23

            I do not think you can use Puppeteer API inside page.evaluate(): it executes its function argument code in the pure browser context, so try to use just Web API here. Here are two equivalent ways (with selectors and XPath) to achieve your goal:

            Source https://stackoverflow.com/questions/61697429

            QUESTION

            Puppeteer page.evaluate querySelectorAll return empty objects
            Asked 2020-Mar-13 at 00:13

            I am trying out Puppeteer. This is a sample code that you can run on: https://try-puppeteer.appspot.com/

            The problem is this code is returning an array of empty objects:

            [{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}]

            Am I making a mistake?

            ...

            ANSWER

            Answered 2017-Sep-24 at 02:51

            The values returned from evaluate function should be json serializeable. https://github.com/GoogleChrome/puppeteer/issues/303#issuecomment-322919968

            the solution is to extract the href values from the elements and return it.

            Source https://stackoverflow.com/questions/46377955

            QUESTION

            how to scroll through multiple iframes in puppeteer
            Asked 2019-Feb-23 at 00:55

            I am trying to generate pdf with multiple iframes using puppeteer. One issue I encounter is that if I embed something like google maps, google maps will do lazily load(it only loads when the element is in view point of the browser. One solution is to scroll through different iframes on the page and set a wait time for each iframe to load.

            here is what I have so far (able to test in https://try-puppeteer.appspot.com/) puppeteer: version 1.9.0, I also tried in 1.12.0, could not make the scroll to work nor the timeout.

            ...

            ANSWER

            Answered 2019-Feb-22 at 23:44

            This code has some issues:

            1. frames is a non-serializable object from Node.js context so it cannot be transferred in the browser context as is.
            2. All setTimeout() callbacks will be called at once after 2 sec so each frame will not have enough time to be loaded.
            3. These setTimeout() callbacks are not awaited: page.evaluate() returns before these 2 sec pass and pdf creation happens before iframe loading.

            You can try this approach:

            Source https://stackoverflow.com/questions/54835427

            QUESTION

            Table heading is not repeating in all the pages in PDF generated using puppeteer
            Asked 2018-Sep-04 at 07:20

            I'm using puppeteer to generate pdf of a web page. But the issue is table heading is not appearing in all the pages. Please find the code below.

            ...

            ANSWER

            Answered 2018-Sep-04 at 07:17

            I've got the solution. I had to upgrade puppeteer 1.5.0 to 1.7.0

            Thanks

            Source https://stackoverflow.com/questions/52154485

            QUESTION

            Passing a thunk to puppeteer's $.eval
            Asked 2018-Jun-02 at 17:19

            The function setValue receives a value and returns a function. Inside the second function I'm trying to console log the value of value but I get

            ...

            ANSWER

            Answered 2018-Jun-02 at 17:19

            This is a problem that is common to any library that is executed in Node.js and evaluates code in browser (Protractor, TestCafe, Nightmare, etc). A function is stringified and passed to a browser as a string. Original scope of (input) => { console.log(value) } is lost, and value is expected to be a global, which is undefined.

            As the documentation mentions, additional arguments are supposed to be passed to $eval.

            It should be:

            Source https://stackoverflow.com/questions/50657830

            QUESTION

            Deploying NodeJS, Puppeteer, and Angular on Google Cloud
            Asked 2017-Nov-17 at 16:25

            I have the following setup:

            Angular Front-end
            MongoDb database
            NodeJS/Express backend for API (+ puppeteer)

            steps to deployment:
            1. ng build -prod --> creates dist in /server
            2. gcloud app deploy (Node.js + Express + Puppeteer + Dockerfile config*)

            Because puppeteer is basically chrome; some libraries which aren't given to me, had to be uploaded. No problem, Docker to the rescue.

            ...

            ANSWER

            Answered 2017-Nov-17 at 16:25

            I'm not entirely sure how billing works on Google Cloud. If it's message throughput then running headless Chrome is going to be expensive no matter what since it sends requests through WebSockets (meaning at a cost, likely).

            This is something that browserless is designed bottom-up for: headless browsers in the cloud. I've also open-sourced the underlying docker images here if you're interested.

            I think the bottom line is that many/most providers out there just really aren't well setup to handle binaries executing like a browser. Either their way of deploying makes it tough, or that their methodologies behind billing make it expensive. Believe me when I say that your issue regarding billing and transparency aren't the first I have encountered.

            Source https://stackoverflow.com/questions/47340404

            QUESTION

            Deploying multiple package.json Google Cloud
            Asked 2017-Nov-02 at 17:09

            I am trying to modify this build: https://github.com/ebidel/try-puppeteer

            I noticed that there are 2 package.json (and server.js) files.

            1. root (https://github.com/ebidel/try-puppeteer/blob/master/package.json)

            2. backend (https://github.com/ebidel/try-puppeteer/blob/master/backend/package.json)

            Why do they deploy the backend and front end separately, with 2 express servers? Is this best practice? Design overkill?

            What is the purpose of having two server.js files (or two servers) in one project?

            Does it have a hierarchy system I overlooked?

            Additionally, how do I deploy this project? from root of from backend?

            ...

            ANSWER

            Answered 2017-Oct-31 at 16:24

            You should deploy both, root is the frontend. From root :

            Source https://stackoverflow.com/questions/47039983

            QUESTION

            How to pass the "page" element to a function with puppeteer?
            Asked 2017-Oct-29 at 17:31

            I’m trying check if elements are available on a page from within a function, if the element is on the page, good, continue with the code, if not, log the error.

            Using the try puppeteer page, here is what I tried:

            ...

            ANSWER

            Answered 2017-Oct-29 at 17:31

            You can use this variant to check if the element is in the page or not.

            Source https://stackoverflow.com/questions/47002776

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install try-puppeteer

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/ebidel/try-puppeteer.git

          • CLI

            gh repo clone ebidel/try-puppeteer

          • sshUrl

            git@github.com:ebidel/try-puppeteer.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link