10

I have more than 7000 posts in my Tumblr account. The vast majority of them are "reblogs" but the rest are posts (images or texts) that I have uploaded. Is there a way to somehow view these particular posts? One way would have been if I had used a certain tag to these posts but I have not. To rephrase my question: Is there a way to view all the Tumblr posts available whose source was my account?

4

I’m the author of the script linked in @oneqeightyfour’s answer. So although I’m a little late to the party, here’s a modified version of the script you can use.

I did find a one-click site that claims to do this as well, but I couldn’t get that to work. You might want to try that first?


Step 1: get a Tumblr API key

Using the API is much simpler, from a programming perspective, than trying to scrape the site. Also, Tumblr T&Cs frown upon you bulk accessing data without going via the API.

To get your API key:

  1. Make sure you’re logged into Tumblr
  2. Go to their OAuth registration page.
  3. Select “Register Application”, and use the following details:

    • Application Name: Find all my original posts
    • Application Description: Find all the original posts on a site; that is, posts that aren’t weblogs
    • Default callback URL: /
  4. This takes you back to the first page. You’ll be shown an OAuth Consumer Key. Copy this – we’ll be using it shortly.

Step 2: Set up the script

This is the lightly modified version of my script. Copy and paste this into a text editor (e.g. TextEdit or Notepad) and save it as originals.py.

You should replace the HOSTNAME variable with the URL of your blog, and the API_KEY variable with the OAuth Consumer Key you retrieved in step 1.

#!/usr/bin/env python

import json
try:
    from urllib.request import urlopen
except ImportError:
    from urllib2 import urlopen

HOSTNAME = "alexwlchan.tumblr.com"
API_KEY = "abcdefg"

BASE_URL = (
    "http://api.tumblr.com/v2/blog/{hostname}/"
    "posts?api_key={key}&reblog_info=true"
) .format(hostname=HOSTNAME,key=API_KEY)


def api_response(url):
    req = urlopen(url)
    return json.loads(req.read())


jsonresponse = api_response(BASE_URL)
post_count = jsonresponse["response"]["total_posts"]

for count in range(0, post_count, 20):
    jsonresponse = api_response("{url}&offset={count}".format(
        url=BASE_URL,
        count=count))

    for post in jsonresponse["response"]["posts"]:
        if "reblogged_from_name" not in post:
            print(post["post_url"])

print("All finished!")

Step 3: Run the script

This is a Python script, suitable for Python 2 or 3. If you Google around, you should be able to find instructions for running Python scripts for your operating system of choice.

The script will print out a list of URLs where it didn’t get any reblog information from the Tumblr API. In my (very brief) testing, it seemed to pick up a handful of URLs that were actually reblogs – I haven’t done any digging to find out why that’s the case.

Have fun! :-)

  • Thank you very much, even though it's a late answer :) – Aventinus Jul 30 '16 at 22:53
3
+25

Someone on the internet wrote a script for this and you can find it on Github. You would've to change the parameters of hostname and API key to your own tumblr hostname and add your own API key respectively.

Your hostname would be something like "x.tumblr.com", (be sure to wrap it with "" marks).

You will then need to get an API key from Tumblr. To do this:

  1. Ensure that you are logged in to Tumblr.
  2. Access the OAuth registration page.
  3. Click on Register Application with the following details:

    • Application Name: Untagged Post Finder
    • Description: Finds untagged posts
    • Default Callback URL: /
  4. You'll be taken back to the previous page and given your consumer key.

  5. Copy paste the key you've gotten into the script and run it.

If you're not familiar with scripts and coding, you can alternatively use his "one-click" solution site and just provide the url of your Tumblr.

  • 1
    This is the closest answer yet, but not entirely relevant. This piece of software seeks the posts that do not have a tag on it. Although useful, it's not necessary true that my posts wouldn't have a tag. In my example I mentioned that it would have been really easy if I had used a certain tag to tag all of my original posts. – Aventinus Mar 28 '16 at 6:21
  • It just occurred to me that I have absolutely overlooked and ruled out the fact that some of your source posts could've been tagged and that will render this approach irrelevant then. I'm not familiar at all with coding, but if you are, maybe you can look at amending the integers from selecting untagged source posts to tagged source posts? – oneqeightyfour Mar 28 '16 at 6:34
  • Yes, I've actually thought of that. Maybe I will adjust the code. Never the less, this is the closest answer yet. – Aventinus Mar 28 '16 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.