fix: new version of soup sieve broke the shadow server fetcher

pull/12/head
Raphaël Vinot 2019-03-25 00:39:43 +01:00
parent aeb90e6c5f
commit 019ef1c40a
1 changed files with 3 additions and 3 deletions

View File

@ -48,11 +48,11 @@ class ShadowServerFetcher():
html_index = await self.__get_index()
soup = BeautifulSoup(html_index, 'html.parser')
treeview = soup.find(id='treemenu1')
for y in treeview.select('> li'):
for y in treeview.select(':scope > li'):
year = y.contents[0]
for m in y.contents[1].select('> li'):
for m in y.contents[1].select(':scope > li'):
month = m.contents[0]
for d in m.contents[1].select('> li'):
for d in m.contents[1].select(':scope > li'):
day = d.contents[0]
date = parse(f'{year} {month} {day}').date()
self.available_entries[date.isoformat()] = []