From 002128dee9363ce71326374e1e36a99f84733e58 Mon Sep 17 00:00:00 2001 From: libenc <75132456+libenc@users.noreply.github.com> Date: Fri, 16 Feb 2024 19:40:59 +0800 Subject: [PATCH 1/3] Fix some vaild `lang_result` that get incorrectly fallbacked --- src/yagooglesearch/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/yagooglesearch/__init__.py b/src/yagooglesearch/__init__.py index 3112072..f495160 100644 --- a/src/yagooglesearch/__init__.py +++ b/src/yagooglesearch/__init__.py @@ -144,7 +144,11 @@ def __init__( self.query = urllib.parse.quote_plus(query) self.tld = tld self.lang_html_ui = lang_html_ui - self.lang_result = lang_result.lower() + self.lang_result = ( + lang_result.lower() + if "-" not in lang_result + else f"{lang_result.split('-')[0].lower()}-{lang_result.split('-')[1].upper()}" + ) self.tbs = tbs self.safe = safe self.start = start From 102fcebab7e0b20404a06bfed22f400ffa068e09 Mon Sep 17 00:00:00 2001 From: libenc <75132456+libenc@users.noreply.github.com> Date: Sun, 7 Apr 2024 08:28:11 +0800 Subject: [PATCH 2/3] Bumped version to 1.10.0 --- src/yagooglesearch/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yagooglesearch/__init__.py b/src/yagooglesearch/__init__.py index f495160..95e2567 100644 --- a/src/yagooglesearch/__init__.py +++ b/src/yagooglesearch/__init__.py @@ -14,7 +14,7 @@ # Custom Python libraries. -__version__ = "1.9.0" +__version__ = "1.10.0" # Logging ROOT_LOGGER = logging.getLogger("yagooglesearch") From c1ca1cfd0d1ffe60240b2f5b1845233972fd535e Mon Sep 17 00:00:00 2001 From: opsdisk Date: Sun, 7 Apr 2024 07:51:51 -0500 Subject: [PATCH 3/3] Added libenc as contributor --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 701cf2e..3f4250e 100644 --- a/README.md +++ b/README.md @@ -305,3 +305,4 @@ Project Link: [https://github.com/opsdisk/yagooglesearch](https://github.com/ops * [KennBro](https://github.com/KennBro) - * [ArshansGithub](https://github.com/ArshansGithub) - * [pguridi](https://github.com/pguridi) - +* [libenc](https://github.com/libenc) -