HTMLが壊れている、あなたは別のパーサを必要とする、あなたはlxmlのを使用することができます。
soup = BeautifulSoup(r.content, 'lxml')
それともhtml5lib使用:
soup = BeautifulSoup(r.content, 'html5lib')
をlxmlのを持っていますlibxmlのような依存関係は、html5libをpipと一緒にインストールすることができます。
In [9]: url = "http://www.krak.dk/cafe/s%C3%B8g.cs?consumer=suggest?search_word=cafe"
In [10]: r = requests.get(url)
In [11]: soup = BeautifulSoup(r.content, 'html.parser')
In [12]: len(soup.find_all("ol", {"class": "hit-list"}))Out[12]: 0
In [13]: soup = BeautifulSoup(r.content, 'lxml')
In [14]: len(soup.find_all("ol", {"class": "hit-list"}))
Out[14]: 1
In [15]: soup = BeautifulSoup(r.content, 'html5lib')
In [16]: len(soup.find_all("ol", {"class": "hit-list"}))
Out[16]: 1
一つだけhit-list
ので、あなたがfind_allの代わりに見つけ使用することができますし、また、使用するID soup.find(id="hit-list")
を使用することができますもあります。あなたはhtmlのthorughを実行する場合は、w3c's html validatorあなたは多くの問題があることがわかります。