Skip to content

Commit

Permalink
update. warning対応
Browse files Browse the repository at this point in the history
  • Loading branch information
blacknon committed Aug 29, 2023
1 parent 60bc95b commit ad9a749
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
19 changes: 10 additions & 9 deletions pydork/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,17 +369,17 @@ def search(self, keyword: str, search_type='text', maximum=100):
self.ENGINE.MESSAGE.print_text(
url,
mode='debug',
separator=": ",
header=self.ENGINE.MESSAGE.HEADER + ': ' +
separator=": ", # type: ignore
header=self.ENGINE.MESSAGE.HEADER + ': ' + \
Color.GRAY + '[DEBUG]: [TargetURL]' + Color.END
)

# debug
self.ENGINE.MESSAGE.print_text(
self.ENGINE.USER_AGENT,
mode='debug',
separator=": ",
header=self.ENGINE.MESSAGE.HEADER + ': ' +
separator=": ", # type: ignore
header=self.ENGINE.MESSAGE.HEADER + ': ' + \
Color.GRAY + '[DEBUG]: [UserAgent]' + Color.END
)

Expand All @@ -391,8 +391,8 @@ def search(self, keyword: str, search_type='text', maximum=100):
self.ENGINE.MESSAGE.print_text(
html,
mode='debug',
separator=": ",
header=self.ENGINE.MESSAGE.HEADER + ': ' +
separator=": ", # type: ignore
header=self.ENGINE.MESSAGE.HEADER + ': ' + \
Color.GRAY + '[DEBUG]: [Response]' + Color.END
)

Expand Down Expand Up @@ -425,8 +425,8 @@ def search(self, keyword: str, search_type='text', maximum=100):
# debug
self.ENGINE.MESSAGE.print_text(
html,
mode='debug',
header=self.ENGINE.MESSAGE.HEADER + ': ' + Color.GRAY +
mode='debug', # type: ignore
header=self.ENGINE.MESSAGE.HEADER + ': ' + Color.GRAY + \
'[DEBUG]: [ReCaptchaedResponse]' + Color.END,
separator=": "
)
Expand Down Expand Up @@ -495,7 +495,8 @@ def search(self, keyword: str, search_type='text', maximum=100):

# commandの場合の出力処理
self.ENGINE.MESSAGE.print_text(
'Finally got ' + self.ENGINE.COLOR +
# type: ignore
'Finally got ' + self.ENGINE.COLOR + \
str(len(result)) + Color.END + ' links.',
header=self.ENGINE.MESSAGE.ENGINE,
separator=": ",
Expand Down
16 changes: 7 additions & 9 deletions pydork/engine_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
* SearchEngine Classから呼び出す、各検索エンジンで共通の処理を保持させる継承用Classである `CommonEngine` を持つモジュール.
"""

import sys

import requests
import os
import pickle
Expand Down Expand Up @@ -644,17 +642,17 @@ def get_links(self, source_url, html: str, type: str):
# before processing elists
self.MESSAGE.print_text(
','.join(elinks), # type: ignore
header=self.MESSAGE.HEADER + ': ' + Color.BLUE +
header=self.MESSAGE.HEADER + ': ' + Color.BLUE + \
'[BeforeProcessing elinks]' + Color.END,
separator=" :",
mode="debug",
)

# before processing etitles
self.MESSAGE.print_text(
','.join(etitles),
header=self.MESSAGE.HEADER + ': ' +
Color.BLUE + '[BeforeProcessing etitles]' + Color.END,
','.join(etitles), # type: ignore
header=self.MESSAGE.HEADER + ': ' + Color.BLUE + \
'[BeforeProcessing etitles]' + Color.END,
separator=" :",
mode="debug",
)
Expand All @@ -666,16 +664,16 @@ def get_links(self, source_url, html: str, type: str):
# after processing elists
self.MESSAGE.print_text(
','.join(elinks), # type: ignore
header=self.MESSAGE.HEADER + ': ' +
header=self.MESSAGE.HEADER + ': ' + \
Color.GREEN + '[AfterProcessing elinks]' + Color.END,
separator=" :",
mode="debug",
)

# after processing etitles
self.MESSAGE.print_text(
','.join(etitles),
header=self.MESSAGE.HEADER + ': ' +
','.join(etitles), # type: ignore
header=self.MESSAGE.HEADER + ': ' + \
Color.GREEN + '[AfterProcessing etitles]' + Color.END,
separator=" :",
mode="debug",
Expand Down

0 comments on commit ad9a749

Please sign in to comment.