Skip to content

Commit

Permalink
Minor Code Refactoring Because of Dependency Update
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-sincek committed Sep 26, 2024
1 parent 202312f commit c2fa2e6
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ python3 -m pip install --upgrade build

python3 -m build

python3 -m pip install dist/google_chad-6.4-py3-none-any.whl
python3 -m pip install dist/google_chad-6.5-py3-none-any.whl
```

## Shortest Possible
Expand Down Expand Up @@ -279,7 +279,7 @@ Additionally, to avoid hitting rate limits on platforms like [Instagram's](https
## Usage

```fundamental
Chad v6.4 ( github.com/ivan-sincek/chad )
Chad v6.5 ( github.com/ivan-sincek/chad )
Usage: chad -q queries [-s site ] [-x proxies ] [-o out ]
Example: chad -q queries.txt [-s *.example.com] [-x proxies.txt] [-o results.json]
Expand Down Expand Up @@ -346,7 +346,7 @@ DEBUG
```

```fundamental
Chad Extractor v6.4 ( github.com/ivan-sincek/chad )
Chad Extractor v6.5 ( github.com/ivan-sincek/chad )
Usage: chad-extractor -t template -res results -o out [-s sleep] [-rs random-sleep]
Example: chad-extractor -t template.json -res chad_results -o report.json [-s 1.5 ] [-rs ]
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "google-chad"
version = "6.4"
version = "6.5"
authors = [{ name = "Ivan Sincek" }]
description = "Not another Google Dorking tool."
readme = "README.md"
Expand All @@ -19,7 +19,7 @@ dependencies = [
"asyncio>=3.4.3",
"colorama>=0.4.6",
"datetime>=5.2",
"nagooglesearch>=7.2",
"nagooglesearch>=7.3",
"playwright>=1.47.0",
"regex>=2023.8.8",
"requests>=2.31.0",
Expand Down
30 changes: 15 additions & 15 deletions src/chad/chad.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ def run(self):
for query in self.__queries:
count += 1
entry = {"query": query, "proxy": None, "urls": None}
parameters = {
search_parameters = {
"q" : entry["query"],
"tbs" : self.__tbs,
"num" : self.__get_num_pages(),
"hl" : "en",
"filter": "0",
"safe" : "images"
"safe" : "images",
"num" : self.__get_num_pages()
}
while not exit_program:
# --------------------
Expand All @@ -181,24 +181,24 @@ def run(self):
# --------------------
self.__status(count, entry["query"], entry["proxy"])
client = nagooglesearch.SearchClient(
tld = "com",
parameters = parameters,
max_results = self.__total_results,
user_agent = self.__get_user_agent(),
proxy = entry["proxy"],
min_sleep = self.__minimum_pages,
max_sleep = self.__maximum_pages,
debug = self.__debug
tld = "com",
search_parameters = search_parameters,
user_agent = self.__get_user_agent(),
proxy = entry["proxy"],
max_results = self.__total_results,
min_sleep = self.__minimum_pages,
max_sleep = self.__maximum_pages,
debug = self.__debug
)
entry["urls"] = client.search()
# --------------------
remove_proxy = False
error = client.get_current_error()
error = client.get_error()
if error:
termcolor.cprint(error, "yellow")
if error == "INIT_ERROR":
exit_program = True
elif error == "REQUESTS_ERROR" or error == "429_TOO_MANY_REQUESTS":
elif error == "REQUESTS_EXCEPTION" or error == "429_TOO_MANY_REQUESTS":
if entry["proxy"]:
remove_proxy = True
else:
Expand Down Expand Up @@ -337,7 +337,7 @@ def remove_proxy(self, proxy):
class MyArgParser(argparse.ArgumentParser):

def print_help(self):
print("Chad v6.4 ( github.com/ivan-sincek/chad )")
print("Chad v6.5 ( github.com/ivan-sincek/chad )")
print("")
print("Usage: chad -q queries [-s site ] [-x proxies ] [-o out ]")
print("Example: chad -q queries.txt [-s *.example.com] [-x proxies.txt] [-o results.json]")
Expand Down Expand Up @@ -568,7 +568,7 @@ def main():
if validate.run():
print("###########################################################################")
print("# #")
print("# Chad v6.4 #")
print("# Chad v6.5 #")
print("# by Ivan Sincek #")
print("# #")
print("# Search Google Dorks like Chad. #")
Expand Down
4 changes: 2 additions & 2 deletions src/chad_extractor/chad_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ def __page_block(self, request):
class MyArgParser(argparse.ArgumentParser):

def print_help(self):
print("Chad Extractor v6.4 ( github.com/ivan-sincek/chad )")
print("Chad Extractor v6.5 ( github.com/ivan-sincek/chad )")
print("")
print("Usage: chad-extractor -t template -res results -o out [-s sleep] [-rs random-sleep]")
print("Example: chad-extractor -t template.json -res chad_results -o report.json [-s 1.5 ] [-rs ]")
Expand Down Expand Up @@ -1103,7 +1103,7 @@ def main():
if validate.run():
print("###########################################################################")
print("# #")
print("# Chad Extractor v6.4 #")
print("# Chad Extractor v6.5 #")
print("# by Ivan Sincek #")
print("# #")
print("# Extract and validate data from Chad results or plaintext files. #")
Expand Down

0 comments on commit c2fa2e6

Please sign in to comment.