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...
- ^
- -----------------------------------------------------------------------------
- # encoding: UTF-8
- require 'xmlrpc/client'
- # build a post
- post = {
- 'title' => "Post Title 7",
- '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('5.175.158.210', '/xmlrpc.php')
- # make the call to publish a new post
- connection.call(
- 'metaWeblog.newPost',
- 1,
- 'root',
- 'passme2150',
- post,
- true
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement