aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2021-03-23 00:08:11 +0300
committerEvgeny Zinoviev <me@ch1p.io>2021-03-23 00:08:11 +0300
commit560d8822ec78a5e4bac44b5bbd752a1acefcf59a (patch)
treebea4ec714cb21fa28cd871c8ebaadb6a90d48c82
initial
-rw-r--r--.gitignore2
-rw-r--r--e3372.py17
-rw-r--r--main.py11
-rw-r--r--requirements.txt3
4 files changed, 33 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6b75623
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+.idea
+venv \ No newline at end of file
diff --git a/e3372.py b/e3372.py
new file mode 100644
index 0000000..7d0b9d5
--- /dev/null
+++ b/e3372.py
@@ -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) \ No newline at end of file
diff --git a/main.py b/main.py
new file mode 100644
index 0000000..10104b1
--- /dev/null
+++ b/main.py
@@ -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()
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..92a180f
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,3 @@
+requests~=2.25.1
+bs4~=0.0.1
+beautifulsoup4~=4.9.3 \ No newline at end of file