Skip to content

Commit 6ff0a1d

Browse files
myslak71myslak71
myslak71
authored and
myslak71
committed
add type annotations
1 parent 53d1b12 commit 6ff0a1d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

web_crawler/site_map.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import Union
2+
13
import requests
24
from requests_html import HTMLSession
35

@@ -14,7 +16,7 @@
1416
}
1517

1618

17-
def site_map(domain_url: str):
19+
def site_map(domain_url: str) -> Union[dict, None]:
1820
"""
1921
Site crawling function.
2022
@@ -64,7 +66,7 @@ def site_map(domain_url: str):
6466
return url_entries
6567

6668

67-
def get_site_data(url: str):
69+
def get_site_data(url: str) -> dict:
6870
"""
6971
Collects title and links from given url.
7072

0 commit comments

Comments
 (0)