title: Scraping website with Beautiful soup but getting an error
body: <pre><code>from bs4 import BeautifulSoup
  import requests 
  import csv 
  import pandas as pd
  </code></pre>
  <p>#Generate csv file</p>
  <pre><code>outfile = open('scrape.csv','w',newline='')
  writer = csv.writer(outfile)
  </code></pre>
  <p>#List all urls</p>
  <pre><code>urls = ['https://www.rpsgroup.com/services/','https://www.rpsgroup.com']
  </code></pre>
  <p>#Create a blank data frame</p>
  <pre><code>df = pd.DataFrame(columns=['Header1','Image Source', 'Alt Tag'])
  </code></pre>
  <p>#Html parser</p>
  <pre><code> for i in urls:               
          Web_page = requests.get(urls)
          soup = BeautifulSoup(Web_page.content, 'html.parser')
      
  </code></pre>
  <p>#Print headings</p>
  <pre><code>h1 = soup.find_all('h1')  
  print(h1.get_text())
  header1 = h1.get_text()
  </code></pre>
  <p>#Find all images in that class</p>
  <pre><code>    image =soup.find('div',class_='organism-3-col')
      image_link = image.find_all('img')
  </code></pre>
  <p>#Find image and source attribute</p>
  <pre><code>for image in image_link:
      if image.has_attr('src'):
          print (image['src'])
          image_source = image('src')
          
          print (image['alt'])
          image_alt = image('alt')
      else:
          print('Source not found')
  </code></pre>
  <p>#Create a new data frame and add columns</p>
  <pre><code>    df2 = pd.DataFrame([[header1, image_source, image_link]], columns=['Header1', 'Image source', 'Image link' ])
  </code></pre>
  <p>#Append the previous data frame with the extracted information</p>
  <pre><code> df= df.append(df2, ignore_index=True)
      
  </code></pre>
  <p>#save to csv</p>
  <pre><code>df.to_csv('scrape.csv')
  outfile.close()
  </code></pre>