Skip to content
This repository was archived by the owner on Jan 3, 2024. It is now read-only.

Commit 757667e

Browse files
committed
Grammar
1 parent cfa9a9e commit 757667e

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,12 @@ Install using pip:
126126
127127
pip install selenium-wire
128128
129-
If you get an error about not being able to build cryptography, you may be running an old version of pip. Try upgrading pip with ``python -m pip install --upgrade pip``, and then re-run the above command.
129+
If you get an error about not being able to build cryptography you may be running an old version of pip. Try upgrading pip with ``python -m pip install --upgrade pip`` and then re-run the above command.
130130

131131
Browser Setup
132132
-------------
133133

134-
No specific configuration should be necessary except to ensure that you have downloaded the `ChromeDriver`_ and `GeckoDriver`_ for Chrome and Firefox to be remotely controlled - the same as if you were using Selenium directly. Once downloaded, these executables should be placed somewhere on your PATH.
134+
No specific configuration should be necessary except to ensure that you have downloaded the `ChromeDriver`_ and `GeckoDriver`_ for Chrome and Firefox to be remotely controlled, the same as if you were using Selenium directly. Once downloaded, these executables should be placed somewhere on your PATH.
135135

136136
.. _`ChromeDriver`: https://sites.google.com/a/chromium.org/chromedriver/
137137

@@ -183,7 +183,7 @@ For sub-packages of ``webdriver``, you should continue to import these directly
183183
184184
**Chrome and Firefox**
185185

186-
For Chrome and Firefox, you don't need to do anything special. Just instantiate the webdriver as you would normally with ``webdriver.Chrome()`` or ``webdriver.Firefox()`` passing in any `desired capabilities`_ and browser specific options for `Chrome`_ or `Firefox`_ , such as the executable path, headless mode etc. Selenium Wire also has it's `own options`_ that can be passed in the ``seleniumwire_options`` attribute.
186+
For Chrome and Firefox you don't need to do anything special. Just instantiate the webdriver as you would normally with ``webdriver.Chrome()`` or ``webdriver.Firefox()`` passing in any `desired capabilities`_ and browser specific options for `Chrome`_ or `Firefox`_ , such as the executable path, headless mode etc. Selenium Wire also has it's `own options`_ that can be passed in the ``seleniumwire_options`` attribute.
187187

188188
.. _`own options`: #all-options
189189
.. _`desired capabilities`: https://selenium-python.readthedocs.io/api.html#desired-capabilities
@@ -204,7 +204,7 @@ Selenium Wire has limited support for using the remote webdriver client. When yo
204204
seleniumwire_options=options
205205
)
206206
207-
If the machine running the browser needs to use a different address to talk to the machine running Selenium Wire, you need to configure the browser manually. `This issue <https://github.com/wkeeling/selenium-wire/issues/220>`_ goes into more detail.
207+
If the machine running the browser needs to use a different address to talk to the machine running Selenium Wire you need to configure the browser manually. `This issue <https://github.com/wkeeling/selenium-wire/issues/220>`_ goes into more detail.
208208

209209
Accessing Requests
210210
~~~~~~~~~~~~~~~~~~
@@ -218,7 +218,7 @@ Selenium Wire captures all HTTP/HTTPS traffic made by the browser [1]_.
218218
Convenience attribute for retrieving the most recently captured request. This is more efficient than using ``driver.requests[-1]``.
219219

220220
``driver.wait_for_request(pat, timeout=10)``
221-
This method will wait until it sees a request matching a pattern. The ``pat`` attribute will be matched within the request URL. ``pat`` can be a simple sub-string or a regex. Note that ``driver.wait_for_request()`` doesn't *make* a request, it just *waits* for a previous request made by some other action - and it will return the first request it finds. Also note that since ``pat`` can be a regex, you must escape special characters such as question marks with a slash. A ``TimeoutException`` is raised if no match is found within the timeout period.
221+
This method will wait until it sees a request matching a pattern. The ``pat`` attribute will be matched within the request URL. ``pat`` can be a simple sub-string or a regex. Note that ``driver.wait_for_request()`` doesn't *make* a request, it just *waits* for a previous request made by some other action and it will return the first request it finds. Also note that since ``pat`` can be a regex, you must escape special characters such as question marks with a slash. A ``TimeoutException`` is raised if no match is found within the timeout period.
222222

223223
For example, to wait for an AJAX request to return after a button is clicked:
224224

@@ -231,7 +231,7 @@ Selenium Wire captures all HTTP/HTTPS traffic made by the browser [1]_.
231231
request = driver.wait_for_request('/api/products/12345/')
232232
233233
``driver.har``
234-
A JSON formatted HAR archive of HTTP transactions that have taken place. HAR capture is turned off by default, and you must set the ``enable_har`` `option`_ to ``True`` before using ``driver.har``.
234+
A JSON formatted HAR archive of HTTP transactions that have taken place. HAR capture is turned off by default and you must set the ``enable_har`` `option`_ to ``True`` before using ``driver.har``.
235235

236236
``driver.iter_requests()``
237237
Returns an iterator over captured requests. Useful when dealing with a large number of requests.
@@ -290,7 +290,7 @@ Request objects have the following attributes.
290290
The request URL, e.g. ``https://server/some/path/index.html?foo=bar&spam=eggs``
291291

292292
``ws_messages``
293-
Where the request is a websocket handshake request (normally with a URL starting ``wss://``), then ``ws_messages`` will contain a list of any websocket messages sent and received. See `WebSocketMessage Objects`_.
293+
Where the request is a websocket handshake request (normally with a URL starting ``wss://``) then ``ws_messages`` will contain a list of any websocket messages sent and received. See `WebSocketMessage Objects`_.
294294

295295
Request objects have the following methods.
296296

@@ -480,7 +480,7 @@ To unset an interceptor, use ``del``:
480480
Limiting Request Capture
481481
~~~~~~~~~~~~~~~~~~~~~~~~
482482

483-
Selenium Wire works by redirecting browser traffic through an internal proxy server it spins up in the background. As requests flow through the proxy they are intercepted and captured. Capturing requests can slow things down a little, but there are a few things you can do to restrict what gets captured.
483+
Selenium Wire works by redirecting browser traffic through an internal proxy server it spins up in the background. As requests flow through the proxy they are intercepted and captured. Capturing requests can slow things down a little but there are a few things you can do to restrict what gets captured.
484484

485485
``driver.scopes``
486486
This accepts a list of regular expressions that will match the URLs to be captured. It should be set on the driver before making any requests. When empty (the default) all URLs are captured.
@@ -499,7 +499,7 @@ Selenium Wire works by redirecting browser traffic through an internal proxy ser
499499
Note that even if a request is out of scope and not captured, it will still travel through Selenium Wire.
500500

501501
``seleniumwire_options.disable_capture``
502-
Use this option to switch off request capture. Requests will still pass through Selenium Wire and through any upstream proxy you have configured, but they won't be stored.
502+
Use this option to switch off request capture. Requests will still pass through Selenium Wire and through any upstream proxy you have configured but they won't be stored.
503503

504504
.. code:: python
505505
@@ -588,7 +588,7 @@ The proxy configuration can also be loaded through environment variables called
588588
SOCKS
589589
-----
590590

591-
Using a SOCKS proxy is the same as using an HTTP based one, but with the scheme set to ``socks5``:
591+
Using a SOCKS proxy is the same as using an HTTP based one but you set the scheme to ``socks5``:
592592

593593
.. code:: python
594594
@@ -616,7 +616,7 @@ Selenium Wire will automatically integrate itself with `undetected-chromedriver`
616616

617617
.. _`undetected-chromedriver`: https://github.com/ultrafunkamsterdam/undetected-chromedriver
618618

619-
If you wish to take advantage of this, make sure you have undetected-chromedriver installed:
619+
If you wish to take advantage of this make sure you have undetected-chromedriver installed:
620620

621621
.. code:: bash
622622
@@ -638,7 +638,7 @@ Then just use ``webdriver.Chrome()`` as you would normally, making sure that you
638638
639639
The first time you run the webdriver it will download and patch the ChromeDriver binary in the background.
640640

641-
You can check that undetected_chromedriver is being used by looking for the log messages it generates. You just need to ensure that you've activated logging at the top of your script or program first - for example:
641+
You can check that undetected_chromedriver is being used by looking for the log messages it generates. You just need to ensure that you've activated logging at the top of your script or program first, for example:
642642

643643
.. code:: python
644644

0 commit comments

Comments
 (0)