mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
Pyupgrade to Python 3.9 (#4718)
* Pyupgrade to Python 3.9 * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
"""Get the site emails from URL."""
|
||||
from __future__ import annotations
|
||||
|
||||
__author__ = "Muhammad Umer Farooq"
|
||||
__license__ = "MIT"
|
||||
__version__ = "1.0.0"
|
||||
@ -8,7 +10,6 @@ __status__ = "Alpha"
|
||||
|
||||
import re
|
||||
from html.parser import HTMLParser
|
||||
from typing import Optional
|
||||
from urllib import parse
|
||||
|
||||
import requests
|
||||
@ -20,7 +21,7 @@ class Parser(HTMLParser):
|
||||
self.urls: list[str] = []
|
||||
self.domain = domain
|
||||
|
||||
def handle_starttag(self, tag: str, attrs: list[tuple[str, Optional[str]]]) -> None:
|
||||
def handle_starttag(self, tag: str, attrs: list[tuple[str, str | None]]) -> None:
|
||||
"""
|
||||
This function parse html to take takes url from tags
|
||||
"""
|
||||
|
Reference in New Issue
Block a user