Simple Python Program to Extract links from Web Page

Simple Python Program to Extract links from Web Page #Author Kumar Shubham # http://hackaholic.info # This program will extract all the links from a webpage import sys import urllib2 import re def find_link(url): sys.stdout.write(“Wait a Minute its retrieving.”) try: if url[0:4]!=”http”: url=”http://” + url f=(urllib2.urlopen(url)).read() k=re.findall(‘(src|href)=”(\S+)”‘,f) k=set(k) print “The Links[…] Continue reading

Server using python

Server using python. Python modue SimpleHTTPServer will let to make any directory to server. Just open terminal and go to that directory and type “python -m SimpleHTTPServer” without quotes.NOW your current directory is server. Now you can browse you directory in web browser by typing “localhost:8000” without quotes or “local-ip:8000”.[…] Continue reading