# HG changeset patch # User Daniel O'Connor # Date 1534055248 -34200 # Node ID 04874587fb6e2f806f83ffe3ce230c3d668cb87d # Parent 7571c101a4eeba0fa58cbd6181938c993cc24de5 suppress new BeautifulSoup warning diff -r 7571c101a4ee -r 04874587fb6e adslstats.py --- a/adslstats.py Mon Jun 19 10:02:30 2017 +0930 +++ b/adslstats.py Sun Aug 12 15:57:28 2018 +0930 @@ -139,7 +139,7 @@ def authenticate(br, base, username, password): # Connect and authenticate r = br.open(base) - bs = bs4.BeautifulSoup(r) + bs = bs4.BeautifulSoup(r, 'lxml') token = bs.head.find(lambda tag: tag.has_attr('name') and tag['name'] == 'CSRFtoken')['content'] #print('Got CSRF token ' + token) @@ -166,7 +166,7 @@ def fillstats(br, base, stats): # Fetch stats and parse r = br.open(base + '/modals/broadband-bridge-modal.lp') - bs = bs4.BeautifulSoup(r) + bs = bs4.BeautifulSoup(r, 'lxml') if bs.find('div', 'login') != None: return False