File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848
4949PAYLOAD_DELIMITER = "\x00 "
5050CHAR_INFERENCE_MARK = "%c"
51+
52+ # minimum time response set needed for time-comparison based on standard deviation
5153MIN_TIME_RESPONSES = 10
5254
55+ # after these number of blanks at the end inference should stop (just in case)
56+ INFERENCE_BLANK_BREAK = 20
57+
5358# System variables
5459IS_WIN = subprocess .mswindows
5560# The name of the operating system dependent module imported. The following
Original file line number Diff line number Diff line change 3434from lib .core .exception import unhandledException
3535from lib .core .progress import ProgressBar
3636from lib .core .settings import CHAR_INFERENCE_MARK
37+ from lib .core .settings import INFERENCE_BLANK_BREAK
3738from lib .core .unescaper import unescaper
3839from lib .request .connect import Connect as Request
3940
@@ -506,6 +507,9 @@ def downloadThread():
506507 elif conf .verbose in (1 , 2 ):
507508 dataToStdout (val )
508509
510+ if len (finalValue ) > INFERENCE_BLANK_BREAK and finalValue [- INFERENCE_BLANK_BREAK :].isspace ():
511+ break
512+
509513 if conf .verbose in (1 , 2 ) or showEta :
510514 dataToStdout ("\n " )
511515
You can’t perform that action at this time.
0 commit comments