ejes consulting

Techincal Consulting Design and Automation


leave a comment »


import re,sys,os,urllib

if len(sys.argv)==1:
        print ‘Usage:\n%s “search term”\n’ % sys.argv[0]


(cin,cout,cerr)=os.popen3(‘lynx -accept_all_cookies -dump ‘+url)
for lines in cout.readlines():
        if re.compile(‘^[ ]+[0-9]+[.] ‘).search(lines):
                if not ‘google’ in lines:
                        outme=re.sub(‘(^[ ]*[0-9]+[.] |\r?\n)’,”,lines)
                        print outme

Written by ejes

August 24, 2009 at 12:25 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: