How to find the raw header of a website using python?
Question: I'm learning something about the website by myself. and I'm trying to fetch
the raw header followed by the 3-digit HTTP return code from a website. Here
is what I did so far:

    
    
    import urllib.request
    with urllib.request.urlopen('https://www.youtube.com/results?search_query=clippers+vs+lakers') as response:
        html_text = response.read()
    print(html_text)
    

It prints everything from the source. Then I use "Command + F" to search for
some key word like "raw header", but I cannot find something useful. Can
somebody help me get the raw header from the page source please? Is there some
library to do that? Thanks!


Answer: Try `response.info()` method to get the headers.

