LoginSignup
0
2

More than 3 years have passed since last update.

pythonでXMLRPCを使ってFC2ブログ等を更新する方法

Posted at

pythonでXMLRPCを使ってfc2ブログを更新する例です。
自動でブログを投稿したい時なんかに非常に便利だと思っています。

import xmlrpc.client
# xmlrpcで使用するドメイン
DOMAIN = "http://blog.fc2.com/xmlrpc.php"
# xmlrpcで使用するBLOG_ID
BLOG_ID = ""
# xmlrpcで使用するUSERNAME
USERNAME = "xxxxx@xxx.xxx"
# xmlrpcで使用するPASSWORD
PASSWORD = "xxxxx"

contents = {}
contents["title"] = "タイトル"
contents["description"] = "記事"

proxy = xmlrpc.client.ServerProxy(DOMAIN)
proxy.metaWeblog.newPost(BLOG_ID, USERNAME, PASSWORD, contents, 1)
0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2