From 714a62245610bd19b4056878b808f3d6e59e88c6 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 1 Sep 2009 16:57:51 +0100 Subject: [PATCH] More robust way to find arch/islands table --- yarrg/yppedia-ocean-scraper | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/yarrg/yppedia-ocean-scraper b/yarrg/yppedia-ocean-scraper index ad35c4d..a854035 100755 --- a/yarrg/yppedia-ocean-scraper +++ b/yarrg/yppedia-ocean-scraper @@ -95,8 +95,7 @@ def parse_chart(): return s def parse_ocean(): - firstarch = soup.find('a', attrs = {'title': title_arch_ok}) - debug('fa',firstarch) + content = soup.find('div', attrs = {'id': 'content'}) def findall_title_arch_ok(t): return t.findAll('a', attrs = {'title': title_arch_ok}) @@ -105,7 +104,7 @@ def parse_ocean(): if u.name != 'table': return False return len(findall_title_arch_ok(u)) > 1 - archestable = firstarch.findParent('table', attrs={'border':'1'}) + archestable = content.findChild('table', attrs={'border':'1'}) debug('at',archestable) archsoups = [] -- 2.30.2