Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- why this error
- root@demo:/var/www# ruby post.rb
- post.rb:7: syntax error, unexpected tIDENTIFIER, expecting '}'
- ..." [video][track kind="captions" src="http://video-js.zencode...
- ^
- post.rb:7: syntax error, unexpected tIDENTIFIER, expecting $end
- ...rack kind="captions" src="http://video-js.zencoder.com/ocean...
- ^
- -----------------------------------------------------------------------------
- require 'xmlrpc/client'
- # build a post
- post = {
- 'title' => 'oceans-captions',
- 'description' => '[video][track kind="captions" src="http://video-js.zencoder.com/oceans-captions.vtt" srclang="en" label="English" default="true"][/video]',
- 'mt_keywords' => ['a', 'list', 'of', 'tags'],
- 'categories' => ['a', 'list', 'of', 'categories']
- }
- # initialize the connection
- connection = XMLRPC::Client.new('129.0.0.01', '/xmlrpc.php')
- # make the call to publish a new post
- connection.call(
- 'metaWeblog.newPost',
- 1,
- 'username',
- 'pass',
- post,
- true
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement