I am trying to run a Python script that gets some data from here.
import urllib.request, urllib.parse, urllib.error
from bs4 import BeautifulSoup
url = urllib.request.urlopen('http://database.ukrcensus.gov.ua/PXWEB2007/ukr/news/op_popul.asp')
soup = BeautifulSoup(url, 'html.parser')
print(soup)
It runs just fine on Mac but when I try to run it on Linux I get this kind of output:
<area alt="������� ��������" coords="2,5,21,26" href="../../index.htm" shape="rect" title="������� ��������"/>
<area alt="����� �����" coords="43,6,62,26" href="../../ukr/help/web_map.asp" shape="rect" title="����� �����"/>
<area alt="��������� ��'����" coords="85,7,105,27" href="../../ukr/help/contact.asp" shape="rect" title="��������� ��'����"/>
I guess there is something wrong with encoding/decoding but I cannot really figure out what exactly. Thanks in advance.