2017-12-15 4 views
3

나는 능동적으로 URL을 처리하지 못했고 문제를 더 디버깅 할 방법을 찾지 못했습니다. "능동태 - 새로 고침"및 "명령"에 대해 능동적으로 디버그 수준을 활성화했습니다. 여전히 능 직물은 오류에 대한 세부 정보를 제공하지 않습니다. 여기디버그 능동 예외 오류

$ twill-sh 

    -= Welcome to twill! =- 

    current page: *empty page* 
    >> debug equiv-refresh 1 
    DEBUG: setting equiv-refresh debugging to level 1 
    current page: *empty page* 
    >> debug http 1 
    DEBUG: setting http debugging to level 1 
    current page: *empty page* 
    >> debug commands 1 
    DEBUG: setting commands debugging to level 1 
    current page: *empty page* 
    >> go https://auth.nbnco.net.au/okta/login 

    ERROR: cannot go to 'https://auth.nbnco.net.au/okta/login' 

    current page: *empty page* 

그리고 파이썬 스크립트의 출력은 다음과 같습니다 : 여기에 능 쉬의 출력은

$ ./test.py 
    Traceback (most recent call last): 
     File "./test.py", line 13, in <module> 
     go("https://auth.nbnco.net.au/okta/login") 
     File "/usr/lib/python2.7/site-packages/twill/commands.py", line 109, in go 
     browser.go(url) 
     File "/usr/lib/python2.7/site-packages/twill/browser.py", line 91, in go 
     raise TwillException("cannot go to '%s'" % (url,)) 
    twill.errors.TwillException: cannot go to 'https://auth.nbnco.net.au/okta/login' 

답변

1

추측 : 확인 문제가있어 능 직물 페이지를로드하지 않습니다 페이지의 SSL 인증서. urllib2.urlopen를 사용하여 페이지를 가져 오지 시도

이 오류와 함께 실패합니다 : 파이어 폭스에서 나를 위해 오류없이

$ curl https://auth.nbnco.net.au/okta/login > /dev/null 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
    0  0 0  0 0  0  0  0 --:--:-- --:--:-- --:--:--  0 
curl: (60) SSL certificate problem: unable to get local issuer certificate 
More details here: http://curl.haxx.se/docs/sslcerts.html 

curl performs SSL certificate verification by default, using a "bundle" 
of Certificate Authority (CA) public keys (CA certs). If the default 
bundle file isn't adequate, you can specify an alternate file 
using the --cacert option. 
If this HTTPS server uses a certificate signed by a CA represented in 
the bundle, the certificate verification probably failed due to a 
problem with the certificate (it might be expired, or the name might 
not match the domain name in the URL). 
If you'd like to turn off curl's verification of the certificate, use 
the -k (or --insecure) option. 

페이지로드 : 컬을 사용하여 페이지를 가져 오기

>>> urllib2.urlopen('https://auth.nbnco.net.au/okta/login') 
Traceback (most recent call last): 
...                          
urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)> 

이 출력을 생성 및 Chromium을 사용하므로 인증서는 브라우저의 인증서 처리 방식에 따라 다르게 처리됩니다.

사이트 SSL 인증서는 시만텍에서 발급 한 것입니다. 이 동작이 과거에 시만텍 인증서 발급 문제와 관련되어 Chrome 및 Mozilla가 distrust SSL certificates from Symantec in 2018임을 발표하게 만들었을 가능성이 있습니다.

트윌에서이 문제를 해결하기 위해 할 수있는 일은 없을 것이라고 생각합니다.