AyumuKasuga/russian_workdays

UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 31377: character maps to <undefined>

xaionaro opened this issue · 2 comments

$ python ./parser.py 
fetch http://www.superjob.ru/proizvodstvennyj_kalendar/
Traceback (most recent call last):
  File "./parser.py", line 72, in <module>
    s = SuperjobCalendarParser('http://www.superjob.ru/proizvodstvennyj_kalendar/', debug=True)
  File "./parser.py", line 29, in __init__
    self._go()
  File "./parser.py", line 32, in _go
    self.get_years_links()
  File "./parser.py", line 44, in get_years_links
    soup = self._get_soup(self.base_url)
  File "./parser.py", line 38, in _get_soup
    return BeautifulSoup(urllib.urlopen(url).read().decode('cp1251'))
  File "/usr/lib/python2.7/encodings/cp1251.py", line 15, in decode
    return codecs.charmap_decode(input,errors,decoding_table)
UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 31377: character maps to <undefined>

fixed

Thanks. Helped.