changeset 26:04874587fb6e

suppress new BeautifulSoup warning
author Daniel O'Connor <darius@dons.net.au>
date Sun, 12 Aug 2018 15:57:28 +0930
parents 7571c101a4ee
children 607111929e2e
files adslstats.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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