title: TypeError while writing scraped links to a file
body: <p>As I was working on a small web-scraping bot I ran into this error while trying to write links to a file
  <code>unsupported operand type(s) for +: 'int' and 'str'</code>
  I havent tried much to fix it except for testing the same format with <code>link + " "</code> to see if the /n was screwing it up</p>
  
  <p>here's the relevant code I have: </p>
  
  <pre><code>input1 = input("enter your dork or search term : ")
  print("")
  
  link = "https://search.yahoo.com/search?p=" + input1
  print("link to be scraped : " + link)
  print("")
  print("beginning search... ")
  print("")
  time.sleep(5)
  source = requests.get(link)
  bs4call = bs4.BeautifulSoup(source.text, "lxml")
  links = bs4call.findAll('a', {'class':'ac-algo fz-l ac-21th lh-24'})
  
  print("links scraped")
  time.sleep(.5)
  print("")
  print("saving links to file : baselinks")
  time.sleep(1)
  
  for link in links:
    with open('baselinks.txt', 'a') as out:
      out.write((link) + "/n")
  </code></pre>
  
  <hr>
  
  <p>resolved, and I found out something useful just to document: my goal was to have each individual link printed on its own line... so after printing it as a string with <code>out.write(str(link) + "\n"</code> i changed it to <code>out.write(str(link['href]) + "\n")</code> that simplified the output to just links.</p>
  
  <p>Thanks for the support</p>