针对特定链接

时间:2017-06-11 18:39:06

标签: python curl urllib2

我正在巴西总统米歇尔·特梅尔做一些分析,我想创建一个关于他在本周会见的人的信息。

但我不知道为什么我无法从网站上检索数据。

我正在通过Curl获取数据,我已经通过python尝试了urllib2,我被困在请求中。这只是停滞不前。

这就是我正在做的事情:

链接:https://www2.planalto.gov.br/acompanhe-planalto/agenda-do-presidente/agenda-do-presidente-michel-temer/2017-06-09?month:int=6&year:int=2017

我的要求:

curl https://www2.planalto.gov.br/acompanhe-planalto/agenda-do-presidente/agenda-do-presidente-michel-temer/2017-06-09?month:int=6&year:int=2017 --insecure

我添加了一个详细信息,看看发生了什么:

*   Trying 170.246.252.230...
* Connected to www2.planalto.gov.br (170.246.252.230) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /home/t****/anaconda2/ssl/cacert.pem
  CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / DHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: C=BR; O=ICP-Brasil; OU=PR-DITEC; OU=Autoridade Certificadora da Presidencia da Republica; CN=www2.planalto.gov.br
*  start date: Dec 23 19:31:39 2016 GMT
*  expire date: Dec 23 19:31:39 2017 GMT
*  issuer: C=BR; O=ICP-Brasil; OU=Autoridade Certificadora Raiz Brasileira v2; CN=Autoridade Certificadora da Presidencia da Republica v4
*  SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
> GET /acompanhe-planalto/agenda-do-presidente/agenda-do-presidente-michel-temer/2017-06-08?month:int=6&year:int=2017 HTTP/1.1
> Host: www2.planalto.gov.br
> User-Agent: curl/7.49.0
> Accept: */*
> 
* SSL read: error:00000000:lib(0):func(0):reason(0), errno 110
* Closing connection 0
curl: (56) SSL read: error:00000000:lib(0):func(0):reason(0), errno 110

有没有办法获取这些信息?还是一个解决方案?

0 个答案:

没有答案