This commit is contained in:
Evgeny Zinoviev 2021-03-23 00:08:11 +03:00
commit 560d8822ec
4 changed files with 33 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.idea
venv

17
e3372.py Normal file
View File

@ -0,0 +1,17 @@
import requests
from bs4 import BeautifulSoup
class E3372:
def __init__(self, ip: str):
self.ip = ip
self.headers = {}
pass
def auth(self):
pass
def _request(self, endpoint: str, method='GET'):
url = f"http://{self.ip}/api/webserver/SesTokInfo"
r = requests.get(url) if method == 'GET' else requests.post(url)
soup = BeautifulSoup(r.text, "lxml")
print(soup)

11
main.py Normal file
View File

@ -0,0 +1,11 @@
from argparse import ArgumentParser
from pprint import pprint
from e3372 import E3372
def main():
client = E3372('192.168.8.1')
client.auth()
pprint(client.headers)
if __name__ == '__main__':
main()

3
requirements.txt Normal file
View File

@ -0,0 +1,3 @@
requests~=2.25.1
bs4~=0.0.1
beautifulsoup4~=4.9.3