Advertisement
Guest User

Untitled

a guest
Apr 25th, 2013
148
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. # encoding: UTF-8
  17.  
  18. require 'xmlrpc/client'
  19.  
  20. # build a post
  21.  
  22. post = {
  23. 'title' => "Post Title 7",
  24. 'description' => " [video][track kind=\"captions\" src=\"http://video-js.zencoder.com/oceans-captions.vtt\" srclang=\"en\" label=\"English\" default=\"true\"][/video]",
  25. 'mt_keywords' => ['a', 'list', 'of', 'tags'],
  26. 'categories' => ['a', 'list', 'of', 'categories']
  27. }
  28.  
  29. # initialize the connection
  30.  
  31. connection = XMLRPC::Client.new('5.175.158.210', '/xmlrpc.php')
  32.  
  33. # make the call to publish a new post
  34.  
  35. connection.call(
  36. 'metaWeblog.newPost',
  37. 1,
  38. 'root',
  39. 'passme2150',
  40. post,
  41. true
  42. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement