From 91a6f7faed018dc720e608cf63dceb24f4b48db4 Mon Sep 17 00:00:00 2001 From: Rafay Ghafoor Date: Fri, 16 Mar 2018 18:30:39 +0500 Subject: [PATCH] fixed html tag selection --- router.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/router.py b/router.py index 78d74ef..e52bfca 100755 --- a/router.py +++ b/router.py @@ -88,7 +88,8 @@ def dhcpinfo(self): self.dev_info (Dictionary object) ''' soup = self.scrape_page(url=self.gateway + "dhcpinfo.html", soup='y') - for i in soup.findAll('td'): + td = soup.findAll('td') + for i in td: if self.mac_pattern.search(i.text): ''' The HTML page contains hostnames and mac addresses right next