Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/apache-spark/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python ';不间断';使用谷歌阅读器API发布文章_Python_Google Reader - Fatal编程技术网

Python ';不间断';使用谷歌阅读器API发布文章

Python ';不间断';使用谷歌阅读器API发布文章,python,google-reader,Python,Google Reader,有人知道如何使用谷歌阅读器的非官方API删除谷歌阅读器中的文章中的星星吗 我找到了这个,但它不起作用: Python中的pyrfeed模块也没有,每次都会出现IOError异常。尝试使用: r=user%2F[user ID]%2Fstate%2Fcom.google%2Fstarred 而不是 a=user%2F[user ID]%2Fstate%2Fcom.google%2Fstarred 调用编辑标记时。我没有这方面的Python代码(我有Java),但您遇到的问题与您使用的语言

有人知道如何使用谷歌阅读器的非官方API删除谷歌阅读器中的文章中的星星吗

我找到了这个,但它不起作用:

Python中的pyrfeed模块也没有,每次都会出现IOError异常。

尝试使用:

r=user%2F[user ID]%2Fstate%2Fcom.google%2Fstarred 
而不是

a=user%2F[user ID]%2Fstate%2Fcom.google%2Fstarred 

调用编辑标记时。

我没有这方面的Python代码(我有Java),但您遇到的问题与您使用的语言几乎无关,能够看到一些需要了解所有细节的代码总是很好的。您只需要执行我的请求,验证我突出显示的一些细节,并检查是否可能是您的问题

您可以使用此选项删除给定帖子的星号(请注意,如果您需要,此服务同时支持多个项目):

您可以在本文中查看我的答案,了解更多的实施细节(评论中提到的细节)

要列出提要中所有带星号的项,可以使用或。您可以使用这些ID调用上述API来删除星形

最后两个更容易使用。您可以在这些非官方(但结构良好)资源上查看API的详细信息:、


希望有帮助

我看了一下谷歌的代码和Mozilla的Web开发者插件。看起来是这样的:既不尝试用GET也不尝试用POST-works来实现这一点。。。我正在将cookies设置为:header['Cookie']='Name=SID;SID=%s;域名=.google.com;路径=/;Expires=16000000000'%SID可能我在这里遗漏了什么。。。
        String authToken = getGoogleAuthKey();
    // I use Jsoup for the requests, but you can use anything you
    // like - for jsoup you usually just need to include a jar
    // into your java project
Document doc = Jsoup.connect("http://www.google.com/reader/api/0/edit-tag")
    // this is important for permission - more details on how to get this ahead in the text
    .header("Authorization", _AUTHPARAMS + authToken)
    .data(
             // you don't need the userid, the '-' will suffice
             // "r" means remove. you can also use "a" to add
             // you have lots of other options besides starred. e.g: read
            "r", "user/-/state/com.google/starred",
            "async", "true",
            // the feed, but don't forget the beginning: feed/
            "s", "feed/http://www.gizmodo.com/index.xml",
            // there are 2 id formats, easy to convert - more info ahead in the text
            "i", "tag:google.com,2005:reader/item/1a68fb395bcb6947",
            // another token - this one for allow editing - more details on how to get this ahead in the text
            "T", "//wF1kyvFPIe6JiyITNnMWdA"
    )
    // I also send my API key, but I don't think this is mandatory
    .userAgent("[YOUR_APP_ID_GOES_HERE].apps.googleusercontent.com")
    .timeout(10000)
    // VERY IMPORTANT - don't forget the post! (using get() will not work)
    .post();