def parse_soup_page(soup):
 (titles, authors, links) = (list(), list(), list())
 for div in soup.findAll('div'):
  if ((div.name == 'div') and (div.get('class') == 'gs_ri')):
   links.append(div.a['href'])
   div_pub = div.findAll('div')
   for d in div_pub:
    if ((d.name == 'div') and (d.get('class') == 'gs_a')):
     authors.append(d.text)
   titles.append(div.a.text)
 return (titles, authors, links)

def parse_soup_page ( soup ) : ( titles , authors , links ) = ( list ( ) , list ( ) , list ( ) ) for div in soup . findAll ( 'div' ) : if ( ( div . name == 'div' ) and ( div . get ( 'class' ) == 'gs_ri' ) ) : links . append ( div . a [ 'href' ] ) div_pub = div . findAll ( 'div' ) for d in div_pub : if ( ( d . name == 'div' ) and ( d . get ( 'class' ) == 'gs_a' ) ) : authors . append ( d . text ) titles . append ( div . a . text ) return ( titles , authors , links )
parse the page using beautifulsoup .