Advertisement
Guest User

Untitled

a guest
Apr 25th, 2013
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. why this error
  2.  
  3. root@demo:/var/www# ruby post.rb
  4. post.rb:7: syntax error, unexpected tIDENTIFIER, expecting '}'
  5. ..." [video][track kind="captions" src="http://video-js.zencode...
  6. ^
  7. post.rb:7: syntax error, unexpected tIDENTIFIER, expecting $end
  8. ...rack kind="captions" src="http://video-js.zencoder.com/ocean...
  9. ^
  10.  
  11.  
  12.  
  13.  
  14.  
  15. -----------------------------------------------------------------------------
  16. require 'xmlrpc/client'
  17.  
  18. # build a post
  19.  
  20. post = {
  21. 'title' => 'oceans-captions',
  22. 'description' => '[video][track kind="captions" src="http://video-js.zencoder.com/oceans-captions.vtt" srclang="en" label="English" default="true"][/video]',
  23. 'mt_keywords' => ['a', 'list', 'of', 'tags'],
  24. 'categories' => ['a', 'list', 'of', 'categories']
  25. }
  26.  
  27. # initialize the connection
  28.  
  29. connection = XMLRPC::Client.new('129.0.0.01', '/xmlrpc.php')
  30.  
  31. # make the call to publish a new post
  32.  
  33. connection.call(
  34. 'metaWeblog.newPost',
  35. 1,
  36. 'username',
  37. 'pass',
  38. post,
  39. true
  40. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement