-
URL의 구조Raspberry Pi ( python ) 2023. 3. 8. 10:19
1 _ URL의 구조
http://music.naver.com/listen/top100.nhn?domain=OVERSEA&duration=1h#content
위의 주소를 자세하게 설명하면
http --> protocol
music.naver.com --> domain
- music -> 서브 도메인
naver -> 도메인 명
com -> 최상위 도메인
listen/top100.nhn --> path
?domain=OVERSEA&duration=1h --> parameter
#content --> fragment
path (/) , parameter (?) , fragment (#)
- path (/) : 파일의 경로를 가르키며, / 뒤에 나온다.
- parameter (?) : 쿼리 스트링이라고도 부르며, key(파라미터의 이름) = value(파라미터의 값) 형태로 존재한다.
? 뒤에 나열되고, & 기호로 구분되어 여러 개가 존재할 수 있다.
- fragment (#) : 해시태그, 앵커라고도 한다. 특정 요소를 지시할 수 있으며, 해시태그로 이동을 원하는 요소의
id 링크를 연결하면 스크롤 이동 없이 해당 위치로 이동할 수 있다.
'Raspberry Pi ( python )' 카테고리의 다른 글
공공데이터 활용하기 (0) 2023.03.08 Ch.06 Flask를 활용하여 센서 제어하기 (0) 2023.03.07 CH.05 라즈베리파이 GPIO 및 센서 활용하기 (0) 2023.03.03 CH.04 라즈베리 파이를 위한 전자 기초 배우기 (0) 2023.03.03 CH.02 라즈베리 파이를 위한 리눅스 기초 배우기 (0) 2023.02.28