Giter VIP home page Giter VIP logo

Comments (10)

lilydjwg avatar lilydjwg commented on June 10, 2024

你 curl https://zhuanlan.zhihu.com/ 正常吗?

from morerssplz.

luoshuhui avatar luoshuhui commented on June 10, 2024

正常的。

from morerssplz.

luoshuhui avatar luoshuhui commented on June 10, 2024

zhihu.py:58
res = yield httpclient.fetch(url, raise_error=False,validate_cert=False)
就好了。

from morerssplz.

lilydjwg avatar lilydjwg commented on June 10, 2024

不验证证书这习惯可不好。

你试试这段代码呢?

#!/usr/bin/env python3

import socket, ssl

def test():
  sock = socket.socket()
  sock.connect(('118.178.213.186', 443))
  ctx = ssl.create_default_context()
  sock = ctx.wrap_socket(sock, server_hostname='zhuanlan.zhihu.com')
  sock.close()

if __name__ == '__main__':
  test()

from morerssplz.

luoshuhui avatar luoshuhui commented on June 10, 2024

不行,问题是一样的。

from morerssplz.

lilydjwg avatar lilydjwg commented on June 10, 2024
import ssl
print(ssl.get_default_verify_paths())

结果如何?

from morerssplz.

luoshuhui avatar luoshuhui commented on June 10, 2024

没有异常
DefaultVerifyPaths(cafile='/usr/local/etc/openssl/cert.pem', capath='/usr/local/etc/openssl/certs', openssl_cafile_env='SSL_CERT_FILE', openssl_cafile='/usr/local/etc/openssl/cert.pem', openssl_capath_env='SSL_CERT_DIR', openssl_capath='/usr/local/etc/openssl/certs')

from morerssplz.

lilydjwg avatar lilydjwg commented on June 10, 2024

ssl.HAS_SNI 呢?

from morerssplz.

luoshuhui avatar luoshuhui commented on June 10, 2024

return True.

from morerssplz.

lilydjwg avatar lilydjwg commented on June 10, 2024

Wireshark / tcpdump 抓个包吧。

from morerssplz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.