aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2021-03-23 00:13:54 +0300
committerEvgeny Zinoviev <me@ch1p.io>2021-03-23 00:13:54 +0300
commit9959d0b3832a01e3878c5f5b4a7601078ee82df9 (patch)
tree3ebb04e6cccd3fa7d9907b88fc0e35109e1e90a0
parent560d8822ec78a5e4bac44b5bbd752a1acefcf59a (diff)
auth(): test
-rw-r--r--e3372.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/e3372.py b/e3372.py
index 7d0b9d5..6cfa246 100644
--- a/e3372.py
+++ b/e3372.py
@@ -8,10 +8,10 @@ class E3372:
pass
def auth(self):
- pass
+ soup = self._request("webserver/SesTokInfo")
+ print(soup)
def _request(self, endpoint: str, method='GET'):
- url = f"http://{self.ip}/api/webserver/SesTokInfo"
+ url = f"http://{self.ip}/api/{endpoint}"
r = requests.get(url) if method == 'GET' else requests.post(url)
- soup = BeautifulSoup(r.text, "lxml")
- print(soup) \ No newline at end of file
+ return BeautifulSoup(r.text, "lxml") \ No newline at end of file