Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
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

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

29.3k questions

30.6k answers

501 comments

104k users

Browse Categories

...