from bs4 import BeautifulSoup
import requests


BASE_URL = 'http://en.wikipedia.org'

HEADERS = {
    'User-Agent': 'test-single-page'
}


def get_nobel_soup():
    response = requests.get(BASE_URL + '/wiki/List_of_Nobel_laureates',
                            headers=HEADERS)
    return BeautifulSoup(response.content, 'lxml')


soup = get_nobel_soup()
# print(soup.find('table', {'class': 'wikitable sortable'}))

# print(soup.select('table.sortable.wikitable'))
print("\n #### \n")
table = soup.select_one('table.sortable.wikitable')

print(table.select('th'))

from bs4 import BeautifulSoup
import requests


BASE_URL = 'http://en.wikipedia.org'

HEADERS = {
    'User-Agent': 'test-single-page'
}


def get_nobel_soup():
    response = requests.get(BASE_URL + '/wiki/List_of_Nobel_laureates',
                            headers=HEADERS)
    return BeautifulSoup(response.content, 'lxml')


soup = get_nobel_soup()
# print(soup.find('table', {'class': 'wikitable sortable'}))

# print(soup.select('table.sortable.wikitable'))
print("\n #### \n")
table = soup.select_one('table.sortable.wikitable')

print(table.select('th'))

# print(soup.find('table', {'class': 'wikitable sortable'})) # print(soup.select('table.sortable.wikitable')) #### \n")