title: google search using bs4,python
body: <p>I wanted to pick up the address of "<a href="https://imgur.com/a/XE14UEK" rel="nofollow noreferrer">Spotlight 29 casino address</a>" through Google search in the python script. Why isn't my code working?</p>
  
  <pre><code>from bs4 import BeautifulSoup
  # from googlesearch import search
  import urllib.request
  import datetime
  article='spotlight 29 casino address'
  url1 ='https://www.google.co.in/#q='+article
  content1 = urllib.request.urlopen(url1)
  soup1 = BeautifulSoup(content1,'lxml')
  #print(soup1.prettify())
  div1 = soup1.find('div', {'class':'Z0LcW'}) #get the div where it's located
  # print (datetime.datetime.now(), 'street address:  ' , div1.text)
  print (div1)
  </code></pre>
  
  <p><a href="https://paste.ubuntu.com/p/2VD6JySkhr/" rel="nofollow noreferrer"><em>Pastebin Link</em></a></p>