From 96798e3cee45dd3347868dcb9f7ae7742d4e02dc Mon Sep 17 00:00:00 2001 From: Silke Pilon Date: Sun, 15 Jan 2023 15:00:44 +0100 Subject: [PATCH] full headless mode --- README.md | 2 +- pyproject.toml | 2 +- tests/test_example/test.py | 1 - youdotcom/__main__.py | 8 ++++++++ youdotcom/init.py | 3 ++- youdotcom/test.py | 3 +++ 6 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 youdotcom/test.py diff --git a/README.md b/README.md index e655707..507f906 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Markdownify

- YouDotCom for python v1.0.22 + YouDotCom for python v1.0.23
diff --git a/pyproject.toml b/pyproject.toml index e07cb13..3254f81 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "youdotcom" -version = "1.0.22" +version = "1.0.23" description = "official api wrapper for you.com and all of its apps" readme = "README.md" authors = ["SilkePilon "] diff --git a/tests/test_example/test.py b/tests/test_example/test.py index 5639035..e69de29 100644 --- a/tests/test_example/test.py +++ b/tests/test_example/test.py @@ -1 +0,0 @@ -from youdotcom import Webdriver diff --git a/youdotcom/__main__.py b/youdotcom/__main__.py index cbbf529..ace65d2 100644 --- a/youdotcom/__main__.py +++ b/youdotcom/__main__.py @@ -66,5 +66,13 @@ def write(): print("Total time taken: " + text["time"]) +@app.command() +def clear(): + try: + os.system("clear") + except: + os.system("cls") + + if __name__ == "__main__": app() diff --git a/youdotcom/init.py b/youdotcom/init.py index 03a91b3..4cc7005 100644 --- a/youdotcom/init.py +++ b/youdotcom/init.py @@ -150,7 +150,8 @@ def __init_browser(self) -> None: # Start the browser options = uc.ChromeOptions() - options.add_argument(f"--window-size={800},{600}") + # options.add_argument(f"--window-size={800},{600}") + options.add_argument("--headless") if self.__proxy: options.add_argument(f"--proxy-server={self.__proxy}") try: diff --git a/youdotcom/test.py b/youdotcom/test.py new file mode 100644 index 0000000..c39381d --- /dev/null +++ b/youdotcom/test.py @@ -0,0 +1,3 @@ +import write + +print(write.Write.write("an email"))