다른 방법으로 URL을 구성하고이 방법의 동작을 이해하는 데 어려움이 있습니다. 예를 들어 :Python : urljoin과의 혼동
파이썬 3.x를
from urllib.parse import urljoin
>>> urljoin('some', 'thing')
'thing'
>>> urljoin('http://some', 'thing')
'http://some/thing'
>>> urljoin('http://some/more', 'thing')
'http://some/thing'
>>> urljoin('http://some/more/', 'thing') # just a tad/after 'more'
'http://some/more/thing'
urljoin('http://some/more/', '/thing')
'http://some/thing'
당신은이 방법의 정확한 동작을 설명 할 수 있습니까?
이 질문에 대한 사람들의 메모 : 위의 import 문은 Python 3.x 용입니다. 파이썬 2.x에서는 "from urlparse import urljoin"을 사용하십시오. –