Python3 urljoin import fix, refactoring libs