![]() |
VOOZH | about |
In this article, we are going to write a Python script to test the given page is found or not on the server. We will see various methods to do the same.
Method 1: Using Urllib.
Urllib is a package that allows you to access the webpage with the program.
Installation:
pip install urllib
Approach:
Implementation:
Output:
Yeah ! found
Method 2: Using requests
Request allows you to send HTTP/1.1 requests extremely easily. This module also does not come built-in with Python. To install this type the below command in the terminal.
Installation:
pip install requests
Approach:
Implementation:
Output:
True