Using Requests and Beautiful Soup, with the most recent Beautiful Soup 4 docs.
Install our tools (preferably in a new virtualenv):
pip install beautifulsoup4
import socket | |
hostname, sld, tld, port = 'www', 'integralist', 'co.uk', 80 | |
target = '{}.{}.{}'.format(hostname, sld, tld) | |
# create an ipv4 (AF_INET) socket object using the tcp protocol (SOCK_STREAM) | |
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
# connect the client | |
# client.connect((target, port)) |
Using Requests and Beautiful Soup, with the most recent Beautiful Soup 4 docs.
Install our tools (preferably in a new virtualenv):
pip install beautifulsoup4