Python 2.7: Imgur API and getting clear text comments from a post?
<pre><code>client = ImgurClient(client_id, client_secret, access_token, refresh_token)
for item in client.gallery_item_comments("c1SN8", sort='best'):
    print item
</code></pre>

<p>This is my current code. What I'm trying to do is (hopefully) return a list of comment id's from that function. It doesn't do that, and instead outputs this.</p>

<pre><code>&lt;imgurpython.imgur.models.comment.Comment object at 0x03D8EFB0&gt;
...
</code></pre>

<p>What I'm asking is if there is any combination of functions from the Imgur api to get a list of comment id's? <a href="https://github.com/Imgur/imgurpython" rel="nofollow">API</a></p>

<p>In the above code <code>item</code> is a <code>Comment</code> Object representing the comment itself. Because it doesn't have a defined way of how to print the Object, you see <code>imgurpython.imgur.models.comment.Comment</code> telling you the object type and <code>0x03D8EFB0</code> representing the address in memory that object is located at. Do not worry, that is indeed the Comment you're looking for.</p>

<p>Looking at the <a href="https://api.imgur.com/models/comment" rel="nofollow">Imgur API documentation</a> for Comment, you can see the a Comment has the following properties: <code>id</code>, <code>image_id</code>, <code>comment</code>, <code>author</code>, <code>author_id</code>, <code>on_album</code>, <code>album_cover</code>, <code>ups</code>, <code>downs</code>, <code>points</code>, <code>datetime</code>, <code>parent_id</code>, <code>deleted</code>, <code>vote</code>, and <code>children</code>.</p>

<p>You can access each property by accessing <code>item.&lt;property&gt;</code> inside the for loop. For example, if you want to print all the <code>id</code>s you can do the following:</p>

<pre><code>client = ImgurClient(client_id, client_secret, access_token,  refresh_token)
for item in client.gallery_item_comments("c1SN8", sort='best'):
    print item.id
</code></pre>

python imgur