initial
This commit is contained in:
commit
560d8822ec
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
.idea
|
||||
venv
|
17
e3372.py
Normal file
17
e3372.py
Normal 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
11
main.py
Normal 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
3
requirements.txt
Normal file
@ -0,0 +1,3 @@
|
||||
requests~=2.25.1
|
||||
bs4~=0.0.1
|
||||
beautifulsoup4~=4.9.3
|
Loading…
x
Reference in New Issue
Block a user