Show More
@@ -154,6 +154,9 b' def get_domain(url: str) -> str:' | |||||
154 | Gets domain from an URL with random number of domain levels. |
|
154 | Gets domain from an URL with random number of domain levels. | |
155 | """ |
|
155 | """ | |
156 | levels = url.split('.') |
|
156 | levels = url.split('.') | |
|
157 | if len(levels) < 2: | |||
|
158 | return url | |||
|
159 | ||||
157 | top = levels[-1] |
|
160 | top = levels[-1] | |
158 | second = levels[-2] |
|
161 | second = levels[-2] | |
159 |
|
162 |
General Comments 0
You need to be logged in to leave comments.
Login now