Code Monkey home page Code Monkey logo

Comments (7)

appunni-dishq avatar appunni-dishq commented on May 20, 2024

I have already tested the proxy with Google Chrome and python requests both of which didn't give any issue.

from selenium-wire.

wkeeling avatar wkeeling commented on May 20, 2024

Thanks @appunni-dishq for raising. I'll see if I can reproduce. Can you post the selenium wire config that you're passing to the webdriver?

from selenium-wire.

appunni-dishq avatar appunni-dishq commented on May 20, 2024
from seleniumwire import webdriver

proxy = {
            'http': settings.ANALYTICA_HTTP_PROXY,
            'https': settings.ANALYTICA_HTTPS_PROXY,
            'no_proxy': 'localhost,127.0.0.1'
            }
options = webdriver.ChromeOptions()
options.add_argument('--headless')
prefs = {
   "profile.managed_default_content_settings.images": 2,
   "profile.default_content_settings.images": 2
 }
options.add_experimental_option("prefs", prefs)
options.add_argument("--disable-application-cache")
options.add_argument("--ignore-certificate-errors")
options.add_argument("--window-size=1920,1080")
options.add_argument("--start-maximized")
webdriver.Chrome(
            settings.CHROME_WEBDRIVER,
            desired_capabilities=options.to_capabilities(),
            keep_alive=False,
            seleniumwire_options={
                'proxy': proxy,
                "disable_encoding": True
            }
        )

Hi @wkeeling I have added the configuration I used. Also it is working fine in 1.0.4.

from selenium-wire.

wkeeling avatar wkeeling commented on May 20, 2024

@appunni-dishq Thanks. Have you configured the proxy server with authentication (I'm not able to tell from your example above because you're using variables settings.ANALYTICA_HTTPS_PROXY).

from selenium-wire.

appunni-dishq avatar appunni-dishq commented on May 20, 2024

from selenium-wire.

wkeeling avatar wkeeling commented on May 20, 2024

This is no longer an issue on the latest version of selenium wire.

from selenium-wire.

adsk2050 avatar adsk2050 commented on May 20, 2024

I am getting this error when importing seleniumwire:
`
File [\lib\site-packages\wsproto_init_.py:9](file:////lib/site-packages/wsproto/init.py:9)
1 """
2 wsproto
3 ~~~~~~~
4
5 A WebSocket implementation.
6 """
7 from typing import Generator, Optional, Union
----> 9 from .connection import Connection, ConnectionState, ConnectionType
10 from .events import Event
11 from .handshake import H11Handshake

File [\lib\site-packages\wsproto\connection.py:23](file:////lib/site-packages/wsproto/connection.py:23)
21 from .extensions import Extension
22 from .frame_protocol import CloseReason, FrameProtocol, Opcode, ParseFailed
---> 23 from .utilities import LocalProtocolError
26 class ConnectionState(Enum):
27 """
28 RFC 6455, Section 4 - Opening Handshake
29 """

File [\lib\site-packages\wsproto\utilities.py:12](file:////lib/site-packages/wsproto/utilities.py:12)
9 import os
10 from typing import Dict, List, Optional, Union
---> 12 from h11._headers import Headers as H11Headers
14 from .events import Event
15 from .typing import Headers

ImportError: cannot import name 'Headers' from 'h11._headers' (\lib\site-packages\h11_headers.py)
`

from selenium-wire.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.