mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 17:34:49 +08:00
Enable ruff S113 rule (#11375)
* Enable ruff S113 rule * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -77,7 +77,7 @@ def emails_from_url(url: str = "https://github.com") -> list[str]:
|
||||
|
||||
try:
|
||||
# Open URL
|
||||
r = requests.get(url)
|
||||
r = requests.get(url, timeout=10)
|
||||
|
||||
# pass the raw HTML to the parser to get links
|
||||
parser.feed(r.text)
|
||||
@ -88,7 +88,7 @@ def emails_from_url(url: str = "https://github.com") -> list[str]:
|
||||
# open URL.
|
||||
# read = requests.get(link)
|
||||
try:
|
||||
read = requests.get(link)
|
||||
read = requests.get(link, timeout=10)
|
||||
# Get the valid email.
|
||||
emails = re.findall("[a-zA-Z0-9]+@" + domain, read.text)
|
||||
# If not in list then append it.
|
||||
|
Reference in New Issue
Block a user