Get all the links from a website using Python

1
2
import urllib2
import re
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This code snippet written in Python gets all the links from any websites HTML code.

To find all the links, this example uses the urllib2 module together with the re.module

#url #links #link

#python

#cesarnog

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.