Skip to content

Nodriver proxy with authentication #1798

Answered by WindBora
strukiii asked this question in Q&A
Discussion options

You must be logged in to vote

Hi

Here 2 problems arises:

  1. You add handlers after enabling domain (internal implementation overrides enabling domain) - that's the reason why handlers do not receive an event
  2. When you will finally receive an event, your response will block all processes

Solutions:

  1. Add handlers before enabling domain. Only after adding them do enable domain
  2. For such blocking requests there is a must to just use fire-and-forget method e.g. do not await for sending response on req_paused or auth_required. Just wrap the call into asyncio.create_task

Example of working code based of of yours:

class Scraper:
    main_tab: uc.Tab

    def __init__(self):
        uc.loop().run_until_complete(self.run())

    a…

Replies: 3 comments 19 replies

Comment options

You must be logged in to vote
13 replies
@mushifali
Comment options

@tidal10
Comment options

@epicwhale
Comment options

@mushifali
Comment options

@epicwhale
Comment options

Answer selected by strukiii
Comment options

You must be logged in to vote
2 replies
@aoddspotato
Comment options

@kashif-ghafoor
Comment options

Comment options

You must be logged in to vote
4 replies
@SSujitX
Comment options

@LuisGMM
Comment options

@ultrafunkamsterdam
Comment options

@LuisGMM
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet