1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Free Script] Tumblr Blog Scraper By Tag

Discussion in 'Social Networking Sites' started by unmichael, Jun 30, 2014.

  1. unmichael

    unmichael Registered Member

    Joined:
    Dec 30, 2012
    Messages:
    82
    Likes Received:
    11
    So I'm not sure how you all can use this to your benefit but I wrote a basic script that will scrape a Tumblr tag page for all the URLs of people posting to the tag and then separate all
    of the URLs by a comma and render them in the document for you to save for all of your needs.

    I need some ideas on what to do with this. The biggest problem I'm having is me being a JavaScript noob, I don't know how to change the URL of the open window and then execute more code, otherwise I could mass send Ask Messages, and mass follow people using the script below and some additional scripts I wrote. If you know how to execute JavaScript in sequence, i.e: Execute this code, open a new URL then execute code in that new page that was opened automatically I'd appreciate it if you could enlighten me.(Maybe something better than Chrome Console could do this)

    Code:
    targeted = [];
    
    
    usernames = [];
    
    
    var user = document.querySelectorAll('.post_info_fence.has_follow_button > a');
    
    
    for (var i = 0; i < user.length; i++) {
        targeted.push(user[i].attributes.href.value);
    };
    
    
    for (var i=0;i<user.length;i++){
    usernames.push(targeted[i].replace('.tumblr.com','').replace('http://',''))
    };
    
    
    var loadTargeted = function() {
    for(var i=0; i <targeted.length; i++){
    document.write(targeted[i] + ", ");
    }
    };
    
    
    var loadUsernames = function() {
    for(var i=0; i <usernames.length; i++){
    document.write(usernames[i] + ", ");
    }
    };
    
    How to use:


    1. Go to the tag of your choice ie: Tumblr.com/tagged/YOURNICHE
    2. Open the console
    3. Scroll down for however many users you want to scrape for that tag
    4. Copy and Paste the script in
    5. Type underneath the script into the console ether loadTargeted(); to load a page with the URLs (with Http:// and tumblr.com) OR use loadUsernames(); to just get the usernames of all the users posting in that tag (Both are separated by commas)
    6. ???
    7. Profit?

    Again I don't know how this would be useful to you, but if you wanted to mass collect the usernames/URLs of people interested in/posting to a specific tag and then use another resource to mass follow/mass like/mass ask these people that you've logged are interested in the niche, you could potentially gain information on a huge targeted audience.

    I'm sure something like this already exists, but I haven't seen it. Just trying to give back to a community that I've taken so much from. Thank you. And if you could give me advice on how to execute JavaScript on an opened page I'd appreciate it and I could make some cool tools for us because I have some ideas.
    Oh and if you have any ideas feel free to post them or message me!
     
  2. lord1027

    lord1027 Elite Member

    Joined:
    Sep 20, 2013
    Messages:
    3,174
    Likes Received:
    2,222
    I'm sure many people who can't afford bots will find this useful.
     
  3. keywordspot

    keywordspot Jr. VIP Jr. VIP Premium Member

    Joined:
    Dec 17, 2013
    Messages:
    4,284
    Likes Received:
    1,475
    Gender:
    Female
    Occupation:
    contenu visuel
    Location:
    At Hill Station
  4. unmichael

    unmichael Registered Member

    Joined:
    Dec 30, 2012
    Messages:
    82
    Likes Received:
    11
    No Problem! I just figured out a way to auto follow/auto ask with this, using TamperMonkey! However I don't really want to spoon feed everyone...