How to extract data from website using python

I have just started learning python. So any help will be really appreciated. I need to scrape data from a website from a page that contains contact details of different companies. if you go to this site they have many pages with company lists and when you click on a company you go to another page with its contact details. I need to scrape all the details of all the companies in the list and get them into a table. I have already installed different web scraping packages like selenium, beatifulsoup, scrapy. Tried some codes but wasn't able to get through. Please help me out Thanks in advance

I have written this code:

import requests
from bs4 import BeautifulSoup
import time
url = ''
page = ''
while page == '':
        page = requests.get(url)
        print("Connection refused by the server..")
        print("Let me sleep for 5 seconds")
        print("Was a nice sleep, now let me continue...")
soup = BeautifulSoup(page.content, 'lxml' )
l = [] #get the names of the companies
for i in"a[hreflang*=en]"):
import pandas as pd
names = pd.DataFrame({'col':l})  # convert the above list to a dataframe

Python just keeps on printing the above messages.