File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ def search_re(reg, string):
2424 return groups [0 ]
2525
2626
27- def clean_string (s ):
27+ def clear_string (s ):
2828 if s :
2929 return s .strip ().replace (' ' , '' )
3030
Original file line number Diff line number Diff line change 1717import jconfig
1818from .exceptions import *
1919from .utils import (
20- code_from_number , search_re , clean_string ,
20+ code_from_number , search_re , clear_string ,
2121 cookies_to_list , set_cookies_from_list
2222)
2323
@@ -320,11 +320,11 @@ def security_check(self, response=None):
320320 self .logger .info ('Security check is not required' )
321321 return response
322322
323- phone_prefix = clean_string (search_re (RE_PHONE_PREFIX , response .text ))
324- phone_postfix = clean_string (search_re (RE_PHONE_POSTFIX , response .text ))
323+ phone_prefix = clear_string (search_re (RE_PHONE_PREFIX , response .text ))
324+ phone_postfix = clear_string (search_re (RE_PHONE_POSTFIX , response .text ))
325325
326326 code = None
327- if self .login :
327+ if self .login and phone_prefix and phone_postfix :
328328 code = code_from_number (phone_prefix , phone_postfix , self .login )
329329
330330 if code :
You can’t perform that action at this time.
0 commit comments