使用 python ping Pingomatic (XMLRPC) 时出错

发布于 2024-10-07 06:21:43 字数 1175 浏览 0 评论 0原文

我正在尝试使用 python ping Pingomatic。

我写了这个:

import xmlrpclib

print "START"

s = xmlrpclib.Server('http://rpc.pingomatic.com')
reply = s.weblogUpdates.ping('Test','http://www.testblog.com')

print "END"

但是当我跑步时,我得到:

>>> 
START

Traceback (most recent call last):
  File "C:/xxxxxxxxxxxxxxxxxx/pingtest1.py", line 6, in <module>
    reply = j.weblogUpdates.ping('Test','http://www.testblog.com')
  File "C:\Python27\lib\xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "C:\Python27\lib\xmlrpclib.py", line 1570, in __request
    verbose=self.__verbose
  File "C:\Python27\lib\xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "C:\Python27\lib\xmlrpclib.py", line 1297, in single_request
    return self.parse_response(response)
  File "C:\Python27\lib\xmlrpclib.py", line 1462, in parse_response
    p.feed(data)
  File "C:\Python27\lib\xmlrpclib.py", line 557, in feed
    self._parser.Parse(data, 0)
ExpatError: syntax error: line 1, column 0
>>> 

我该如何解决这个问题?

谢谢。

I'm trying to ping Pingomatic using python.

I've written this:

import xmlrpclib

print "START"

s = xmlrpclib.Server('http://rpc.pingomatic.com')
reply = s.weblogUpdates.ping('Test','http://www.testblog.com')

print "END"

But when I run, i get:

>>> 
START

Traceback (most recent call last):
  File "C:/xxxxxxxxxxxxxxxxxx/pingtest1.py", line 6, in <module>
    reply = j.weblogUpdates.ping('Test','http://www.testblog.com')
  File "C:\Python27\lib\xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "C:\Python27\lib\xmlrpclib.py", line 1570, in __request
    verbose=self.__verbose
  File "C:\Python27\lib\xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "C:\Python27\lib\xmlrpclib.py", line 1297, in single_request
    return self.parse_response(response)
  File "C:\Python27\lib\xmlrpclib.py", line 1462, in parse_response
    p.feed(data)
  File "C:\Python27\lib\xmlrpclib.py", line 557, in feed
    self._parser.Parse(data, 0)
ExpatError: syntax error: line 1, column 0
>>> 

How can I fix this?

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风蛊 2024-10-14 06:21:43

事实证明这是 Pingomatic 响应格式的问题。我尝试 ping Weblogs.com,效果很好。

我给 Automattic 发了电子邮件让他们知道,他们已经解决了这个问题 - 一切都应该正常!

It turns out this was an issue with Pingomatic's response format. I tried pinging Weblogs.com, and it worked fine.

I emailed Automattic to let them know, and they've since fixed the issue -- everything should be working!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文