0 votes
1 view
in Python by (1.6k points)

How to get the code of the headers through urllib?

1 Answer

0 votes
by (25.1k points)

You can use the getcode method like this:

req = urllib.urlopen('https://intellipaat.com')

code = req.getcode()

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers !