Created
July 18, 2013 06:55
-
-
Save muzizongheng/6027222 to your computer and use it in GitHub Desktop.
ping blog by url
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ping search engine's ping service | |
# http://ping.baidu.com/ping/RPC2 | |
# http://rpc.pingomatic.com/ | |
# http://api.moreover.com/ping | |
# http://api.my.yahoo.com/rss/ping | |
# http://blogsearch.google.com/ping/RPC2 | |
# http://ping.bitacoras.com | |
# http://ping.feedburner.com | |
# http://ping.syndic8.com/xmlrpc.php | |
# http://rpc.blogrolling.com/pinger/ | |
# http://rpc.icerocket.com:10080/ | |
# http://rpc.technorati.com/rpc/ping | |
# http://rpc.weblogs.com/RPC2 | |
# http://topicexchange.com/RPC2 | |
# http://www.blogdigger.com/RPC2 | |
# http://www.blogoole.com/ping/ | |
# http://www.popdex.com/addsite.php | |
# http://www.wasalive.com/ping/ | |
# http://www.weblogues.com/RPC/ | |
# http://blogping.unidatum.com/RPC2/ | |
# http://www.xianguo.com/xmlrpc/ping.php | |
# http://www.zhuaxia.com/rpc/server.php | |
# http://blog.youdao.com/ping/RPC2 | |
def pingBlog(self, url): | |
blogNewPostUrl = url | |
if url[0:7] != "http://": | |
blogNewPostUrl = self.blogNewPostUrl%url | |
print(blogNewPostUrl) | |
for u in self.pingServiceUrls: | |
try: | |
server = xmlrpc.client.ServerProxy(u) | |
response = server.weblogUpdates.extendedPing(self.blogName , self.blogUrl , blogNewPostUrl, self.blogRSS) | |
print(response) | |
except Exception as err: | |
print("ping ", u, " failed: ", err) | |
finally: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://www.pnbmedia.in