mirror of
https://github.com/kennethreitz/requests-html.git
synced 2026-06-05 06:46:14 +00:00
Made basic fixes
1. Corrected Comments and DocStrings Spell Errors. 2. Added .vscode folder to .gitignore 3. Replaced `i` with place holder `_` (as i is never used)
This commit is contained in:
+4
-1
@@ -103,4 +103,7 @@ venv.bak/
|
|||||||
/site
|
/site
|
||||||
|
|
||||||
# mypy
|
# mypy
|
||||||
.mypy_cache/
|
.mypy_cache/
|
||||||
|
|
||||||
|
# Visual Studio Code
|
||||||
|
.vscode
|
||||||
+3
-3
@@ -569,14 +569,14 @@ class HTML(BaseParser):
|
|||||||
except TimeoutError:
|
except TimeoutError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
self.session.browser # Automatycally create a event loop and browser
|
self.session.browser # Automatically create a event loop and browser
|
||||||
content = None
|
content = None
|
||||||
|
|
||||||
# Automatically set Reload to False, if example URL is being used.
|
# Automatically set Reload to False, if example URL is being used.
|
||||||
if self.url == DEFAULT_URL:
|
if self.url == DEFAULT_URL:
|
||||||
reload = False
|
reload = False
|
||||||
|
|
||||||
for i in range(retries):
|
for _ in range(retries):
|
||||||
if not content:
|
if not content:
|
||||||
try:
|
try:
|
||||||
|
|
||||||
@@ -694,7 +694,7 @@ class AsyncHTMLSession(requests.Session):
|
|||||||
mock_browser: bool = True, *args, **kwargs):
|
mock_browser: bool = True, *args, **kwargs):
|
||||||
""" Set or create an event loop and a thread pool.
|
""" Set or create an event loop and a thread pool.
|
||||||
|
|
||||||
:param loop: Asyncio lopp to use.
|
:param loop: Asyncio loop to use.
|
||||||
:param workers: Amount of threads to use for executing async calls.
|
:param workers: Amount of threads to use for executing async calls.
|
||||||
If not pass it will default to the number of processors on the
|
If not pass it will default to the number of processors on the
|
||||||
machine, multiplied by 5. """
|
machine, multiplied by 5. """
|
||||||
|
|||||||
Reference in New Issue
Block a user