Skip to content

Commit ea98f26

Browse files
author
github-actions
committed
fix conflict
2 parents a7c4407 + 8f8061f commit ea98f26

36 files changed

Lines changed: 184 additions & 231 deletions

bbot/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
__version__ = "v0.0.0"
33

44
from .scanner import Scanner, Preset
5+
6+
__all__ = ["Scanner", "Preset"]

bbot/core/event/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
from .base import make_event, is_event, event_from_json
2+
3+
__all__ = ["make_event", "is_event", "event_from_json"]

bbot/core/helpers/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from .url import *
22
from .misc import *
3-
from . import regexes
4-
from . import validators
3+
from . import regexes as regexes
4+
from . import validators as validators
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
from .installer import DepsInstaller
2+
3+
__all__ = ["DepsInstaller"]

bbot/core/helpers/dns/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from .dns import DNSHelper
1+
from .dns import DNSHelper # noqa

bbot/core/helpers/misc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def is_domain(d):
5050
if is_ip(d):
5151
return False
5252
extracted = tldextract(d)
53-
if extracted.registered_domain:
53+
if extracted.top_domain_under_public_suffix:
5454
if not extracted.subdomain:
5555
return True
5656
else:
@@ -85,7 +85,7 @@ def is_subdomain(d):
8585
if is_ip(d):
8686
return False
8787
extracted = tldextract(d)
88-
if extracted.registered_domain:
88+
if extracted.top_domain_under_public_suffix:
8989
if extracted.subdomain:
9090
return True
9191
else:
@@ -486,7 +486,7 @@ def split_domain(hostname):
486486
return ("", hostname)
487487
parsed = tldextract(hostname)
488488
subdomain = parsed.subdomain
489-
domain = parsed.registered_domain
489+
domain = parsed.top_domain_under_public_suffix
490490
if not domain:
491491
split = hostname.split(".")
492492
subdomain = ".".join(split[:-2])

bbot/core/helpers/web/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from .web import WebHelper
1+
from .web import WebHelper # noqa

bbot/core/helpers/web/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def __init__(self, *args, **kwargs):
7070
kwargs["headers"] = headers
7171
# proxy
7272
proxies = self._web_config.get("http_proxy", None)
73-
kwargs["proxies"] = proxies
73+
kwargs["proxy"] = proxies
7474

7575
log.verbose(f"Creating httpx.AsyncClient({args}, {kwargs})")
7676
super().__init__(*args, **kwargs)

bbot/core/helpers/web/web.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ async def request(self, *args, **kwargs):
9595
files (dict, optional): Dictionary of 'name': file-like-objects for multipart encoding upload.
9696
auth (tuple, optional): Auth tuple to enable Basic/Digest/Custom HTTP auth.
9797
timeout (float, optional): The maximum time to wait for the request to complete.
98-
proxies (dict, optional): Dictionary mapping protocol schemes to proxy URLs.
98+
proxy (str, optional): HTTP proxy URL.
9999
allow_redirects (bool, optional): Enables or disables redirection. Defaults to None.
100100
stream (bool, optional): Enables or disables response streaming.
101101
raise_error (bool, optional): Whether to raise exceptions for HTTP connect, timeout errors. Defaults to False.

bbot/defaults.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ web:
100100
http_retries: 1
101101
# HTTP retries (for httpx)
102102
httpx_retries: 1
103+
# Default sleep interval when rate limited by 429 (and retry-after isn't provided)
104+
429_sleep_interval: 30
105+
# Maximum sleep interval when rate limited by 429 (and an excessive retry-after is provided)
106+
429_max_sleep_interval: 60
103107
# Enable/disable debug messages for web requests/responses
104108
debug: false
105109
# Maximum number of HTTP redirects to follow

0 commit comments

Comments
 (0)