[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上的更多相关文章

  1. (转)内网网站发布到外网-nat123动态公网IP动态域名解析

    环境描述: 路由器分配的是动态公网IP,且有路由器登录管理权限,网站服务器部署在路由器内部网络.如何将内网网站发布到外网大众访问? 解决方案: 内网使用nat123动态域名解析,将域名实时固定解析到路 ...

  2. 腾讯云无法绑定公网IP问题解释与解决方案。

    http://blog.csdn.net/chenggong2dm/article/details/51475222 解释:公网IP并不直接配置在服务器上,而是在服务器外部的路由上,通过某种映射连接. ...

  3. Azure ARM (12) ARM模式下,在负载均衡器上设置多个公网IP地址

    <Windows Azure Platform 系列文章目录> 最近在帮助一个客户设置WAF (Web Application Firewall),WAF厂商要求在负载均衡器上,设置多个公 ...

  4. 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 ...

  5. Python 之自动获取公网IP

    Python 之自动获取公网IP 2017年9月30日 文档下载:https://wenku.baidu.com/view/ff40aef7f021dd36a32d7375a417866fb84ac0 ...

  6. 阿里云上安装启动nginx 以及在个人电脑上通过公网ip访问遇到的问题

    1.安装依赖包 //一键安装上面四个依赖 yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel 2.下载并解压安装包 ...

  7. 阿里云弹性公网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的解耦,满足灵活管理的要求.

  8. Linux 公网IP和内网IP,Dubbo提供者注册到了内网IP上怎么处理!

    1.将Linux的localhost 改为公网IP: 改完以后重启网卡,并刷新Hosts: 2.将提供者和消息者的Dubbo 都改为公网IP: 3.开放端口:

  9. linux之无公网ip的自动登录

    场景 对于有公网ip的链接方式我们都比较清楚了,但是有些服务器不允许直接登录或者没有直接登录的公网ip,所以只能通过一个可以直接登录的堡垒机跳转.这时需要你手动去敲ssh远程链接命令(例如:ssh r ...

随机推荐

  1. 标准W3C盒子模型和IE盒子模型

    标准W3C盒子模型和IE盒子模型   CSS盒子模型:网页设计中CSS技术所使用的一种思维模型. CSS盒子模型组成:外边距(margin).边框(border).内边距(padding).内容(co ...

  2. maven工程下 读取resource下配置文件

    http://blog.csdn.net/xu511739113/article/details/52440982

  3. LCS POJ 1458 Common Subsequence

    题目传送门 题意:输出两字符串的最长公共子序列长度 分析:LCS(Longest Common Subsequence)裸题.状态转移方程:dp[i+1][j+1] = dp[i][j] + 1; ( ...

  4. jQuery Dialog and timepicker显示层的问题

    timepicker官网http://timepicker.co/demos/ 当在dialogue上面调用时间选择时,时间选择的框框被dialogue窗口挡住了. 搜出来的方法说修改css,根本改不 ...

  5. KCF目标跟踪方法分析与总结

    KCF目标跟踪方法分析与总结 correlation filter Kernelized correlation filter tracking 读"J. F. Henriques, R. ...

  6. BZOJ2320 : 最多重复子串

    本题就是求重复数最多的字典序最小的$runs$,如果重复数为1,那么做法显然,然后只考虑重复数大于1的情况. 从小到大枚举长度$len$,对于每个关键点$x=i\times len$,有且仅有一个长度 ...

  7. BZOJ4385 : [POI2015]Wilcze doły

    求出前缀和$s$,设$f[i]=s[i+d-1]-s[i-1]$. 从左到右枚举的右端点$i$,左端点$j$满足单调性,若$s[i]-s[j-1]-\max(区间内最大的f)\leq p$,则可行. ...

  8. 【BZOJ3531】[Sdoi2014]旅行 树链剖分+动态开点线段树

    [BZOJ3531][Sdoi2014]旅行 Description S国有N个城市,编号从1到N.城市间用N-1条双向道路连接,满足从一个城市出发可以到达其它所有城市.每个城市信仰不同的宗教,如飞天 ...

  9. ubuntu 安装 OpenCv 及其Qt的开发环境配置

    ubuntu安装opencv (1)安装编译opencv的环境 sudo apt-get -y install build-essential cmake pkg-config (2)安装Image ...

  10. 51Nod 1136 欧拉函数 Label:数论

    对正整数n,欧拉函数是少于或等于n的数中与n互质的数的数目.此函数以其首名研究者欧拉命名,它又称为Euler's totient function.φ函数.欧拉商数等.例如:φ(8) = 4(Phi( ...