browserless | efficient way to interact with a headless browser | Automation library

 by   microlinkhq JavaScript Version: 10.4.0 License: MIT

kandi X-RAY | browserless Summary

kandi X-RAY | browserless Summary

browserless is a JavaScript library typically used in Automation applications. browserless has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can install using 'npm i @browserless/lighthouse' or download it from GitHub, npm.

The high efficent browser driver on top of puppeteer, ready for production scenarios.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              browserless has a medium active ecosystem.
              It has 1346 star(s) with 69 fork(s). There are 9 watchers for this library.
              There were 9 major release(s) in the last 6 months.
              There are 5 open issues and 51 have been closed. On average issues are closed in 69 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of browserless is 10.4.0

            kandi-Quality Quality

              browserless has 0 bugs and 0 code smells.

            kandi-Security Security

              browserless has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              browserless code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              browserless is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              browserless releases are available to install and integrate.
              Deployable package is available in npm.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed browserless and discovered the below as its top functions. This is intended to give you an instant insight into browserless implemented functionality, and help decide if they suit your requirements.
            • Makes a mimeFunctions and adds it to the mimeTypes array
            Get all kandi verified functions for this library.

            browserless Key Features

            No Key Features are available at this moment for browserless.

            browserless Examples and Code Snippets

            @browserless/aws-lambda-chrome,Usage
            JavaScriptdot img1Lines of Code : 26dot img1License : Permissive (MIT)
            copy iconCopy
            const browserless = require('browserless')
            
            const getChromePath = require('@browserless/aws-lambda-chrome')({
              path: '/tmp'
            })
            
            const isLambda = !!process.env.LAMBDA_TASK_ROOT
            const getExecutablePath = async () => (isLambda ? getChromePath() : un  

            Community Discussions

            QUESTION

            Java Playwright using connect with Proxy for browserless
            Asked 2022-Mar-30 at 22:28

            I want to use Playwright.connect() method using Proxy to consume Browserless. According to Browserless doc.

            ...

            ANSWER

            Answered 2022-Mar-30 at 22:28

            With the help of my friend Alejandro Loyola at Browserless, I am now able to connect. I will post the snippet:

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

            QUESTION

            Java Playwright + Browserless ignore browser download
            Asked 2022-Mar-17 at 13:31

            I am developing a simple prototype with Java + Playwright + Browserless. I was wondering if is possible avoid downloading the browsers in AWS.

            ...

            ANSWER

            Answered 2022-Mar-17 at 13:31

            You can skip the browser download by setting an environment variable PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1

            See the docs here: https://playwright.dev/java/docs/browsers#skip-browser-downloads

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

            QUESTION

            How do I control the timeout of an Device Code Authentication Flow using MSAL/Python against Azure AD?
            Asked 2021-Feb-26 at 06:24

            Background: I am running a browserless application in python using the device code flow to authenticate with Azure Active Directory with token caching using the Python Microsoft Authentication Library (MSAL). I wrote the script based on this blog post. I intend to run this script on a cron job every day, but would like to reduce the time that the msal.acquire_token_by_device_flow() method waits to receive the token after successful authentication in browser. It appears the default value is about 5 hours. This specific use case is when the 90 day refresh token expires and the user needs to re-authenticate, I'd like the script to not hang for hours waiting for the user to reauthenticate.

            What I've Tried: I tried to control this by using the inherited timeout argument (in seconds) when instantiating the PublicClientApplication() object, but it did not affect the timeout. I am not using the http_client argument (mentioned when using timeout). Specifically, I have tried both of the following instantiations:

            ...

            ANSWER

            Answered 2021-Feb-26 at 06:24

            If you want to abort the polling loop at any time, we can change the value of the flow’s “expires_at” key. For more details, please refer to here

            For example

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

            QUESTION

            Calling ms graph API using browserless console python program
            Asked 2020-Oct-07 at 14:46

            I am trying to hit microsoft to do list api using python program.

            Api : https://graph.microsoft.com/beta/me/todo/lists , which resulted in error : Access is denied due to invalid credentials. But when I tried the api : https://graph.microsoft.com/v1.0/users, I am getting the results properly. The documentation of the api (https://docs.microsoft.com/en-us/graph/api/resources/todo-overview?view=graph-rest-beta) says "Currently, the API supports only permissions delegated by the signed-in user". Currently I am trying to get auth code and then auth token and then hitting the API. To act as signed in user, what method should I follow in python? Please note I am not using a web frame work. When I tried using flask and then hitting the API , it works. Need to know how a browserless console python application can serve the purpose.

            Thank youin advance for the help

            ...

            ANSWER

            Answered 2020-Oct-07 at 14:46

            You are getting an App only token using a client credential flow and it doesn't ask for user credentials. Please check these Authentication flows and according to your requirement you can choose one of these and implement it. In other ways you can test your HTTP call in Graph Explorer by adding permissions there itself. Your call works here because you will login as user.

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

            QUESTION

            OAuth - does it make sense to combine Device Flow and Client Credentials flows on same client?
            Asked 2020-Aug-22 at 12:16

            I am developing a browserless app that needs access to two APIs - an Application API (read-only, e.g remote configuration) and a User API (read-write, e.g user preferences).

            The app has the Client ID and Secret stored locally and therefore takes advantage of the Client Credentials flow to access the Application API. Now I need users to be able to access a User API and I'm wondering how to configure the backend (which in this case uses IdentityServer4) to do so. The API should be protected so that only authenticated users can access it and am planning on reading the Claims sent to identify the user.

            Should I extend the existing Client ID to also allow the Device Flow grant type or create a separate Client just for this "user-only" flow?

            I'm new to OAuth and want to make sure I'm doing this right so everything is kept secure.

            ...

            ANSWER

            Answered 2020-Aug-22 at 12:16

            Always use different OAuth clients for different client side connections, which will give you more control:

            • Rules such as access token lifetime can be set differently when needed
            • A compromised client (eg secret stolen) can be disabled without impacting other clients
            • Metrics and logging will be more useful also

            It is usually easy to easily configure multiple clients in the Authorization Server via a Management UI.

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

            QUESTION

            Connect Puppeteer and Browserless Docker Container
            Asked 2020-Aug-07 at 13:28

            I have two containers, one Puppeteer and one Browserless. I try to connect to Browserless, but it fails. Both containers are in the same network.

            Here is my code:

            ...

            ANSWER

            Answered 2020-Aug-07 at 13:28

            Websocket secure, short wss was my issue. The following code works fine.

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

            QUESTION

            WebSocketException: Connection was not upgraded to websocket
            Asked 2020-Jun-06 at 20:20

            I am currently trying to work with the Dart Puppeteer library. I have been running the following piece of code:

            ...

            ANSWER

            Answered 2020-Jun-06 at 20:20

            It turned out to be a problem with Browserless rather than any Dart code on that certain day. I tried it later and it worked flawlessly.

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

            QUESTION

            Is Puppeteer-Cluster Stealthy enough to pass bot tests?
            Asked 2020-May-22 at 21:26

            I wanted to know if anyone using Puppeteer-Cluster could elaborate on how the Cluster.Launch({settings}) protects against sharing of cookies and web data between pages in different context.

            Do the browser contexts here, actually block cookies and user-data is not shared or tracked? Browserless' now infamous page seems to think no, here and that .launch({}) should be called on the task, not ahead of the queue.

            So my question is, how do we know if puppeteer-cluster is sharing cookies / data between queued tasks? And what kind of options are in the library to lower the chances of being labeled a bot?

            Setup: I am using page.authenticate with a proxy service, random user agent, and still getting blocked(403) occasionally by the site which I'm performing the test.

            ...

            ANSWER

            Answered 2020-Jan-16 at 16:01
            Direct answer

            Author of puppeteer-cluster here. The library does not actively block cookies, but makes use of browser.createIncognitoBrowserContext():

            Creates a new incognito browser context. This won't share cookies/cache with other browser contexts.

            In addition, the docs state that "Incognito browser contexts don't write any browsing data to disk" (source), so that restarting the browser cannot reuse any cookies from disk as there were no data written.

            Regarding the library, this means when a job is executed, a new incognito context is created, which does not share any data (cookies, etc.) with other contexts. So as long as Chromium properly implements the incognito browser contexts, there is no data shared between the jobs.

            The page you linked only talks about browser.newPage() (which shares cookies between pages) and not about incognito contexts.

            Why websites might identify you as a bot

            Some websites will still block you, because they use different measures to detect bots. There are headless browser detection tests as well as fingerprinting libraries that might report you as bot if the user agent does not match the browser fingerprint. You might be interested in this answer by me that provides some more detailed explanation how these fingerprints work.

            You can try to use a library like puppeteer-extra that comes with a stealth plugin to help you solve the problem. However, this basically is a cat-and-mouse game. The fingerprinting tests might be changed or another sites might use a different "detection" mechanism. All-in-all, there is no way to guarantee that a website does not detect you.

            In case you want to use puppeteer-extra, be aware that you can use it in conjunction with puppeteer-cluster (example code).

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install browserless

            You can install it via npm:. browserless is backed by puppeteer, so you need to install it as well. You can use it next to puppeteer, puppeteer-core or puppeteer-firefox, interchangeably.

            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
            Install
          • npm

            npm i browserless

          • CLONE
          • HTTPS

            https://github.com/microlinkhq/browserless.git

          • CLI

            gh repo clone microlinkhq/browserless

          • sshUrl

            git@github.com:microlinkhq/browserless.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

            Explore Related Topics

            Consider Popular Automation Libraries

            puppeteer

            by puppeteer

            playwright

            by microsoft

            forever

            by foreversd

            fabric

            by fabric

            Try Top Libraries by microlinkhq

            metascraper

            by microlinkhqHTML

            unavatar

            by microlinkhqJavaScript

            sdk

            by microlinkhqHTML

            cards

            by microlinkhqJavaScript

            youtube-dl-exec

            by microlinkhqJavaScript