added by cdxy May 8 Sun,2016 Use: get_domain('http://cdxy.me:80/cdsa/cda/aaa.jsp?id=2#') Return: 'http://cdxy.me:80'
(url)
| 7 | |
| 8 | |
| 9 | def get_domain(url): |
| 10 | """ |
| 11 | added by cdxy May 8 Sun,2016 |
| 12 | |
| 13 | Use: |
| 14 | get_domain('http://cdxy.me:80/cdsa/cda/aaa.jsp?id=2#') |
| 15 | |
| 16 | Return: |
| 17 | 'http://cdxy.me:80' |
| 18 | """ |
| 19 | p = urlparse.urlparse(url) |
| 20 | return urlparse.urlunsplit([p.scheme, p.netloc, '', '', '']) |
| 21 | |
| 22 | |
| 23 | def iterate_path(ori_str): |
no outgoing calls
no test coverage detected