title: Python web-scraping output
body: <p>I want to make a script that prints the links to results in bing search to the console. The problem is that when I run the script there is no output. I believe the website thinks I am a bot?</p>
  <pre><code>from bs4 import BeautifulSoup
  import requests
  
  search = input(&quot;search for:&quot;)
  params = {&quot;q&quot;: &quot;search&quot;}
  r = requests.get(&quot;http://www.bing.com/search&quot;, params=params)
  
  soup = BeautifulSoup(r.text, &quot;html.parser&quot;)
  results = soup.find(&quot;ol&quot;, {&quot;id&quot;: &quot;b_results&quot;})
  links = results.find_all(&quot;Li&quot;, {&quot;class&quot;: &quot;b_algo&quot;})
  
  for item in links:
      item_text = item.find(&quot;a&quot;).text
      item_href = item.find(&quot;a&quot;).attrs[&quot;href&quot;]
  
      if item_text and item_href:
          print(item_text)
          print(item_href)
  </code></pre>