+ Fix credit parsing
This commit is contained in:
parent
0579b9af0f
commit
1ae8d041f1
@ -441,7 +441,7 @@ class CM_BOT:
|
|||||||
)
|
)
|
||||||
soup = BeautifulSoup(response.content, 'html.parser')
|
soup = BeautifulSoup(response.content, 'html.parser')
|
||||||
try:
|
try:
|
||||||
return float(soup.find('table', {'class': 'generalContent'}).find(text=re.compile('Credit Available')).parent.parent.find_all('td')[2].text)
|
return float(soup.find('table', {'class': 'generalContent'}).find(text=re.compile('Credit Available')).parent.parent.find_all('td')[2].text.replace(",",""))
|
||||||
except:
|
except:
|
||||||
print(f"Error getting credit.")
|
print(f"Error getting credit.")
|
||||||
now = datetime.datetime.now().strftime('%Y%m%d_%H%M')
|
now = datetime.datetime.now().strftime('%Y%m%d_%H%M')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user