GET TITLE

By armagidon on Dec 14, 2008

This script get "TITLE" from website =)

# -*- coding: cp1251 -*-
import httplib

def parsing(txt):
    tt=txt.split('<title>') [1]
    title=tt.split('</title>') [0]
    print " TITLE: ", title

g = raw_input("Enter Website : ")
conn = httplib.HTTPConnection(g)
conn.request("GET", "/index.php")
res = conn.getresponse()
data = res.read()
parsing(data)
conn.close

Comments

Sign in to comment.
PATX   -  Jun 25, 2009

armagidon: ahhhh! you use winblows!!! coughuse-ubuntucough.

 Respond  
armagidon   -  Dec 16, 2008

Xpl0reR download http://python.org/download/ and install ! Run script : go Start -> Run ->
write cmd ! =) cd C:\Python.. and python.exe title.py

 Respond  
xplo   -  Dec 15, 2008

what it is, what it does, how to use/install it.
these are 3 simple points to apply on EVERY scripting websites.

 Respond  
Hawkee   -  Dec 14, 2008

Good point Xpl0reR. armagidon, you need to describe what this does in your introduction.

 Respond  
xplo   -  Dec 14, 2008

wtf is this?

 Respond  
Hawkee   -  Dec 14, 2008

Cool, this could be helpful for a search engine spider written in Python.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.