[generic] simply use urljoin
Remove unused imports