Skip to content

Instantly share code, notes, and snippets.

@gordonmeyer
gordonmeyer / GetTitle.py
Created January 2, 2013 23:59
This script is for use with Keyboard Maestro, as described at: http://www.gordonmeyer.com/2013/01/keyboard-maestro-make-link-with-title-from-clipboard.html It outputs the title of a webpage. The URL is passed via a Keyboard Maestro variable. This is a rather crude, but reliable, method of getting the title and does not require the installation o…
#! /usr/bin/python
"""
brute force get title of web page
usage: getTitle.py url
Gordon Meyer January 1, 2013
www.gordonmeyer.com
"""
# modules used
import urllib2, urlparse, string, os