Jan-22-2020, 04:15 PM
(This post was last modified: Jan-22-2020, 04:17 PM by meleghengersor.)
I have this piece of code to extract a table from a Wikipedia article.
import urllib.request url = "https://en.wikipedia.org/wiki/List_of_London_Underground_stations" page = urllib.request.urlopen(url) from bs4 import BeautifulSoup soup = BeautifulSoup(page, "lxml") all_tables=soup.find_all("table") all_tables right_table=soup.find('table', class_='wikitable sortable plainrowheaders jquery-tablesorter') print(right_table)After print I get 'None' as output. What am I doing wrong?