title: Scraping multiple webpages with Python
body: <pre><code>from bs4 import BeautifulSoup
  import urllib, time
  class scrape(object):
      def __init__(self):
          self.urls = ['https://www.onthemarket.com/for-sale/property/wigan/', 'https://www.onthemarket.com/for-sale/property/wigan/?page=1', 'https://www.onthemarket.com/for-sale/property/wigan/?page=2', 'https://www.onthemarket.com/for-sale/property/wigan/?page=3', 'https://www.onthemarket.com/for-sale/property/wigan/?page=4', 'https://www.onthemarket.com/for-sale/property/wigan/?page=6']
          self.telephones = []
      def extract_info(self):
          for link in self.urls:
              data = urllib.request.urlopen(link).read()
              soup = BeautifulSoup(data, &quot;lxml&quot;)
              for tel in soup.findAll(&quot;span&quot;, {&quot;class&quot;:&quot;call&quot;}):
                  self.telephones.append(tel.text.strip())
              time.sleep(1)
          return self.telephones
  
  to = scrape()
  print(to.extract_info())
  </code></pre>
  <p>What is wrong? This code is hanging after second website. It should extract phone numbers from each webpage in list <code>self.urls</code></p>