【问题标题】:Create short url with YOURLS api and R?使用 YOURLS api 和 R 创建短网址?
【发布时间】:2018-02-25 12:51:27
【问题描述】:

我让 YOURLS 在我的电脑上工作,我可以手动创建链接。

现在,我想用 YOURLS 和 R 以编程方式创建一个短网址?我试过这个

RCurl::getURL('http://yoursite/yourls-api.php?signature=1002a612b4&action="shorturl"&url="https://stackoverflow.com"')

我的猜测是我不明白如何使用 YOURLS api

这是我得到的错误:

[1] "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?><result><errorCode>400</errorCode><message><![CDATA[Unknown or missing &quot;action&quot; parameter]]></message></result>"

【问题讨论】:

  • 它会产生什么错误(如果有的话)?
  • @hrbrmstr,我添加了错误

标签: r rcurl yourls


【解决方案1】:

经过一些实验,我得到了它的工作!

RCurl::getURL('http://yoursite/yourls-api.php?signature=1002a612b4&format=simple&action=shorturl&url=stackoverflow.com&keyword=short1')

【讨论】:

    猜你喜欢
    • 2015-02-25
    • 2013-02-06
    • 1970-01-01
    • 1970-01-01
    • 2017-03-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多