diff --git a/detector_monitorv2.py b/detector_monitorv2.py index 2b7d4fd820dd5c40716e405aa8fac82cb286087e..66693e0243c53e57ad0034f83bb4a2de598c5aab 100644 --- a/detector_monitorv2.py +++ b/detector_monitorv2.py @@ -14,9 +14,12 @@ def statusdetect(): r =requests.get(url) except: print ('ERROR: Issues requesting website: ' + url + '\n') + r='' pass - - soup = BeautifulSoup(r.text,"lxml") + if hasattr(r, 'text'): + soup = BeautifulSoup(r.text,"lxml") + else: + soup = BeautifulSoup(r,"lxml") names = ['GEO 600','LIGO Hanford','LIGO Livingston','Virgo','KAGRA'] detrows = [] to_add=[]