Skip to content

Commit bdc064e

Browse files
authored
Update web-crawler.py
1 parent fdd0882 commit bdc064e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/web-crawler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def crawl(self, startUrl, htmlParser):
2525
def hostname(url):
2626
pos = url.find('/', len(SCHEME))
2727
if pos == -1:
28-
pos = len(url)
28+
return url
2929
return url[:pos]
3030

3131
result = [startUrl]

0 commit comments

Comments
 (0)