diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2021-03-23 00:08:11 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2021-03-23 00:08:11 +0300 |
commit | 560d8822ec78a5e4bac44b5bbd752a1acefcf59a (patch) | |
tree | bea4ec714cb21fa28cd871c8ebaadb6a90d48c82 |
initial
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | e3372.py | 17 | ||||
-rw-r--r-- | main.py | 11 | ||||
-rw-r--r-- | requirements.txt | 3 |
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 @@ -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 |