将公网IP自动发到Twitter上
[Twitter]
1. 在https://apps.twitter.com/创建新的应用
2. 在https://dev.twitter.com/rest/reference/post/statuses/update页面下的OAuth Signature Generator点击刚才创建的应用。

参考:
http://blog.csdn.net/csfreebird/article/details/18238465
https://dev.twitter.com/rest/reference/post/statuses/update
[Python]
1. 首先安装python-pip, 然后通过pip install tweepy, 此时运行脚本虽然成功但是会提示以下告警:
root@ubuntu1404:/home/chen# python postip.py
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
2. 安装这些组件可以消除告警信息: pip install pyopenssl ndg-httpsclient pyasn1
#!/usr/bin/env python
import tweepy
import requests consumer_key = 'f....j'
consumer_secret = 'W....8'
access_token = '4....j'
access_token_secret = 'Q....M' auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth) html = requests.get('http://ip.3322.net')
api.update_status(status=html.text)
参考:
https://www.phodal.com/blog/python-pip-openssl-issue/
http://blog.topspeedsnail.com/archives/3380
将公网IP自动发到Twitter上的更多相关文章
- (转)内网网站发布到外网-nat123动态公网IP动态域名解析
环境描述: 路由器分配的是动态公网IP,且有路由器登录管理权限,网站服务器部署在路由器内部网络.如何将内网网站发布到外网大众访问? 解决方案: 内网使用nat123动态域名解析,将域名实时固定解析到路 ...
- 腾讯云无法绑定公网IP问题解释与解决方案。
http://blog.csdn.net/chenggong2dm/article/details/51475222 解释:公网IP并不直接配置在服务器上,而是在服务器外部的路由上,通过某种映射连接. ...
- Azure ARM (12) ARM模式下,在负载均衡器上设置多个公网IP地址
<Windows Azure Platform 系列文章目录> 最近在帮助一个客户设置WAF (Web Application Firewall),WAF厂商要求在负载均衡器上,设置多个公 ...
- vultr 上实现高可用冗余浮动公网IP出口(使用BIRD+BGP协议)High Availability on Vultr with Floating IP and BGP
官方文档: https://www.vultr.com/docs/high-availability-on-vultr-with-floating-ip-and-bgp https://www.vul ...
- Python 之自动获取公网IP
Python 之自动获取公网IP 2017年9月30日 文档下载:https://wenku.baidu.com/view/ff40aef7f021dd36a32d7375a417866fb84ac0 ...
- 阿里云上安装启动nginx 以及在个人电脑上通过公网ip访问遇到的问题
1.安装依赖包 //一键安装上面四个依赖 yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel 2.下载并解压安装包 ...
- 阿里云弹性公网IP那些事 阿里云云栖号 6月1日 弹性公网IP是独立的公网IP资源,可以绑定到阿里云专有网络VPC类型的ECS、NAT网关、私网负载均衡SLB上,并可以动态解绑,实现公网IP和ECS、NAT网关、SLB的解耦,满足灵活管理的要求。阿里云弹性公网IP那些事 阿里云云栖号 6月1日 弹性络VPC类型的E
阿里云弹性公网IP那些事 阿里云云栖号 6月1日 弹性公网IP是独立的公网关.私网负载均衡SLB上,并可以动态解绑,实现公网IP和ECS.NAT网关.SLB的解耦,满足灵活管理的要求.
- Linux 公网IP和内网IP,Dubbo提供者注册到了内网IP上怎么处理!
1.将Linux的localhost 改为公网IP: 改完以后重启网卡,并刷新Hosts: 2.将提供者和消息者的Dubbo 都改为公网IP: 3.开放端口:
- linux之无公网ip的自动登录
场景 对于有公网ip的链接方式我们都比较清楚了,但是有些服务器不允许直接登录或者没有直接登录的公网ip,所以只能通过一个可以直接登录的堡垒机跳转.这时需要你手动去敲ssh远程链接命令(例如:ssh r ...
随机推荐
- Ipython console in Spyder stuck on “connecting to kernel”
简短地记录下,今天排除的spyder的BUG, 现象:打开Spyder时其他正常,但是Ipython console 不能正常获取到kernel,一直转圈,显示“connecting to kerne ...
- 软件打开时间、窗体透明度、背景色---《用delphi开发共享软件》-15.1任务管理器
1.计算软件启动了多长时间:用定时器,每分钟触发一次: procedure TFrmMain.tmCheckLegalTimer(Sender: TObject);Var Minutes:LongIn ...
- Docker使用-v挂载主机目录到容器后出现Permission denied
1. 在挂载主机目录的到容器后,操作挂载的目录出现权限问题: # 将主机上的/data/share/master目录挂载到容器的/opt/share目录docker run -it --name=ma ...
- MFC 打开文件对话框 打开单个文件
CFileDialog的语法: CFileDialog(BOOL bOpenFileDialog,LPCTSTR lpszDefExt=NULL,LPCTSTR lpszFileName=NULL,D ...
- ccc 正态分布
cc.Class({ extends: cc.Component, properties: { prefab: { default:null, type:cc.Prefab }, root: { de ...
- 栈式自动编码器(Stacked AutoEncoder)
起源:自动编码器 单自动编码器,充其量也就是个强化补丁版PCA,只用一次好不过瘾. 于是Bengio等人在2007年的 Greedy Layer-Wise Training of Deep Netw ...
- [深入浅出Windows 10]不同平台设备的适配
2.3 不同平台设备的适配 Windows 10通用应用程序针对特定的平台还会有一个子API的集合,当我们要使用到某个平台的特定API的时候(比如手机相机硬件按钮触发事件),这时候就需要调用特定平台的 ...
- URAL 1287. Mars Canals
题目链接 这题挺水,看懂了,就OK.卡了几下内存,还是卡过了. #include <iostream> #include <cstdio> #include <cstri ...
- 10.28&29(NOIP模拟&修正&总结)
三道题: T1:约数的约数的个数和.数论.但是简单暴力A了. T2:前k大的(带权点ai与带权点bi的和)的和.二分.骗40. T3:三维空间内每次减少有与空点的点,前后左右相连,求最短时间减为空.d ...
- implicit和explicit的基本使用
class MyAge { public int Age { get; set; } public static implicit operator MyAge(int age) { return n ...