Python urllib.request.urlopen().info().get_content_type()

사용 버전 : Python 3.6.8

사용 프로그램 : Atom 1.35.1 x64


파이썬 urllib.request.urlopen().info().get_content_type()에 대해서 알아보겠습니다.


괄호 안에는 아무것도 들어가지 않습니다.


urllib.request.urlopen().info().get_content_type()은 HTTP 통신의 header 부분에서 content type을 찾아 보여줍니다.




만약 그렇다 할 content type이 없다면,

'text/plain'을 반환합니다.



끝.


카테고리: Python, urllib

댓글

이 블로그의 인기 게시물

Python urllib.parse.quote()

KiCad 시작하기 7 (FreeRoute 사용하기 2)

음악 총보(Score), 파트보(Part)

KiCad 시작하기 1 (회로도 만들기)

Android Kotlin short-circuit evaluation

Forensics .pyc 파일 .py로 복구하기

KiCad 시작하기 3 (새로운 소자 추가하기)

Android Compose automation for getting localized images to use on Play Store app image

Kivy 시작하기 12 (Pyinstaller로 exe 파일 만들기)

KiCad 시작하기 2 (PCB 만들기)