title: How to do reverse image search on google by uploading image url?
body: <p>My goal is to automate google reverse image search.</p>
  
  <p>I would like to upload an image url and get all the website links that include the matching image.</p>
  
  <p>So here is what I could produce so far:</p>
  
  <pre><code>import requests
  import bs4
  
  # Let's take a picture of Chicago
  chicago = 'https://images.squarespace-cdn.com/content/v1/556e10f5e4b02ae09b8ce47d/1531155504475-KYOOS7EEGVDGMMUQQNX3/ke17ZwdGBToddI8pDm48kCf3-plT4th5YDY7kKLGSZN7gQa3H78H3Y0txjaiv_0fDoOvxcdMmMKkDsyUqMSsMWxHk725yiiHCCLfrh8O1z4YTzHvnKhyp6Da-NYroOW3ZGjoBKy3azqku80C789l0h8vX1l9k24HMAg-S2AFienIXE1YmmWqgE2PN2vVFAwNPldIHIfeNh3oAGoMooVv2g/Chi+edit-24.jpg'
  
  # And let's take google image search uploader by url
  googleimage = 'https://www.google.com/searchbyimage?&amp;image_url='
  
  # Here is our Chicago image url uploaded into google image search
  url = googleimage+chicago
  
  # And now let's request our Chichago google image search
  response = requests.get(url)
  soup = bs4.BeautifulSoup(response.text,'html.parser')
  
  # Here is the output
  print(soup.prettify())
  </code></pre>
  
  <p>My problem is that I did not expect this <code>print(soup.prettify())</code>output. 
  I am not including the output in the post because it's too long.</p>
  
  <p>If you type in your browser:</p>
  
  <p><code>https://www.google.com/searchbyimage?&amp;image_url=https://images.squarespace-cdn.com/content/v1/556e10f5e4b02ae09b8ce47d/1531155504475-KYOOS7EEGVDGMMUQQNX3/ke17ZwdGBToddI8pDm48kCf3-plT4th5YDY7kKLGSZN7gQa3H78H3Y0txjaiv_0fDoOvxcdMmMKkDsyUqMSsMWxHk725yiiHCCLfrh8O1z4YTzHvnKhyp6Da-NYroOW3ZGjoBKy3azqku80C789l0h8vX1l9k24HMAg-S2AFienIXE1YmmWqgE2PN2vVFAwNPldIHIfeNh3oAGoMooVv2g/Chi+edit-24.jpg</code> </p>
  
  <p>You will see that the html code is  way different from our output with <code>soup</code>.</p>
  
  <p>I was expecting the <code>soup</code> code to have the final results so I can parse the links I need. Instead I only got some weird functions that I don't really understand.</p>
  
  <p>It seems that google image search is a three step process: first you upload your image, then something happens with weird functions, then you get your final results.</p>
  
  <p>How can I get my final results just like in my browser? So I can parse the html code like usual.</p>