#NEWLINE# def get_patent_urls( keyword , limit = 10 ) : #NEWLINE# #INDENT# keyword = urllib . quote_plus ( keyword ) #NEWLINE# base_url = 'http://www.lens.org' #NEWLINE# url = URL ( ( ( ( ( limit + '/lens/search?ft=true&l=en&st=true&n=' ) + str ( limit ) ) + '&q=' ) + keyword ) ) #NEWLINE# dom = DOM ( url . download ( ) ) #NEWLINE# links = [ ( base_url + a . attributes . get ( 'href' ) ) for a in dom ( 'a.link' ) ] #NEWLINE# return links