From 595f469b4aa1b1741a35b1505621831f0cc725dd Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Thu, 25 Jun 2020 23:34:49 +0000 Subject: [PATCH] Update tildes parser group tag --- apiserver/feeds/tildes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apiserver/feeds/tildes.py b/apiserver/feeds/tildes.py index 1f558b5..83a2e86 100644 --- a/apiserver/feeds/tildes.py +++ b/apiserver/feeds/tildes.py @@ -91,7 +91,7 @@ def story(ref): s['score'] = int(h.find('span', class_='topic-voting-votes').string) s['date'] = unix(h.find('time')['datetime']) s['title'] = str(h.h1.string) - s['group'] = str(soup.find('a', class_='site-header-context').string) + s['group'] = str(soup.find('div', class_='site-header-context').a.string) group_lookup[ref] = s['group'] s['link'] = SITE_LINK(s['group'], ref) ud = a.find('div', class_='topic-full-link') @@ -122,7 +122,7 @@ if __name__ == '__main__': #print(self_post) #li_comment = story('gqx') #print(li_comment) - broken = story('l11') + broken = story('n03') print(broken) # make sure there's no self-reference