sfm-docker
sfm-docker copied to clipboard
How to set the argument "verify=False" of requests.get function?
In China, we cannot acces Twitter. So I set up a Proxy in the host server, and followed the instruction here, and run up sfm-docker. But it fails with:
Last harvest failed. Error messages reported by last harvest: HTTPSConnectionPool(host='api.twitter.com', port=443): Max retries exceeded with url: /1.1/account/verify_credentials.json?tweet_node=extended&tweet_mode=extended (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))
However, when I run :
me@sfm:~/sfm-docker$ docker exec -it sfm_twitterstreamharvester_1 /bin/bash root@071c7dfb1df5:/opt/sfm-twitter-harvester# curl https://api.twitter.com
It get response normally as below:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="en-us">
<meta name="robots" content="noindex, nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Twitter / ?</title>
.......
So, in which function of which file in which container, I can add the argument "verify=False" in order to neglect the SSL error?
Maybe here is a reference.
Hi @fishfree, I'm sorry we haven't had a chance to dig into this yet. Thanks for adding the extra reference.
@lwrubel Thank you! Hope you can reply soon. :-)