View Single Post
Old June 17th, 2017, 03:29 AM   #6
herkalurk
Vintage Member
 
herkalurk's Avatar
 
Join Date: Apr 2011
Location: Tulsa
Posts: 23,168
Thanks: 612
Thanked 275,341 Times in 23,048 Posts
herkalurk 1000000+herkalurk 1000000+herkalurk 1000000+herkalurk 1000000+herkalurk 1000000+herkalurk 1000000+herkalurk 1000000+herkalurk 1000000+herkalurk 1000000+herkalurk 1000000+herkalurk 1000000+
Default

If you are using imagebam, and if you have the api and hopefully linux, i have made a script to get all of the images based on their download link.

First, you will need an output of your gallery list. You can download it with your API calls to a json file, then use php to create an array. It will output something like below.

Code:
stdClass Object
(
    [rsp] => stdClass Object
        (
            [status] => ok
            [galleries] => Array
                (
                    [0] => stdClass Object
                        (
                            [GID] => t78uvjpt8efdghy18q4ovsc65owejghc
                            [URL] => http://www.imagebam.com/gallery/t78uvjpt8efdghy18q4ovsc65owejghc
                            [title] => jay taylor xxxpass Pleasing Dick 5260
                            [description] =>
                        )

                    [1] => stdClass Object
                        (
                            [GID] => dmxqx9419d9dcfg78wzlhfj09yth3swh
                            [URL] => http://www.imagebam.com/gallery/dmxqx9419d9dcfg78wzlhfj09yth3swh
                            [title] => jay taylor xxxpass Jay Taylor 4425
                            [description] =>
                        )

                    [2] => stdClass Object
                        (
                            [GID] => 6qvseh0bi0oqpg4dmihy06dzqwt2wjd3
                            [URL] => http://www.imagebam.com/gallery/6qvseh0bi0oqpg4dmihy06dzqwt2wjd3
                            [title] => jay taylor sweetheartvideo Prison Lesbians 02 24649
                            [description] =>
                        )
Having that in a file, you can then use a simple shell script to download the images into folders based on the gallery names. You will also need the API code to get your images from a gallery based on GID.

Code:
<?php
$API_key = "ABCD1234";
$API_secret = "ABCDEFGH1234567890";
$on1=rand(10000000,99999999);
$oauth_nonce = "$on1";
$oauth_token = "hash";
$oauth_token_secret = "hash";
$oauth_timestamp = time();
$oauth_signature_method = "MD5";

// build the signature string
$oauth_signature_string = "";
$oauth_signature_string .= $API_key;
$oauth_signature_string .= $API_secret;
$oauth_signature_string .= $oauth_timestamp;
$oauth_signature_string .= $oauth_nonce;
$oauth_signature_string .= $oauth_token;
$oauth_signature_string .= $oauth_token_secret;


// calculate the MD5-checksum of the signature string
$oauth_signature = md5($oauth_signature_string);

// populate an array with parameters
$pvars = array(
// parameters required by OAuth
"oauth_consumer_key" => $API_key,
"oauth_signature_method" => $oauth_signature_method,
"oauth_signature" => $oauth_signature,
"oauth_timestamp" => $oauth_timestamp,
"oauth_nonce" => $oauth_nonce,
"oauth_token" => $oauth_token,

// optional parameters
"response_format" => "JSON",
"gallery_id" => "$argv[1]"
);

// initialize curl and set parameters
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://www.imagebam.com/sys/API/resource/get_gallery_images');
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $pvars);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

// execute, get information and close connection
$response = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close ($curl);


// check if the http-code is 200
if($info['http_code'] != 200){
exit("OAuth error: ".$response);
}

// decode the json-encoded response
$response_array = json_decode($response);

// print nicely
print_r($response_array);
?>
Call the above script - php script.php [GID]

If you have multiple galleries based on the same name, the script will append a number up to 50. If you have an empty gallery name, the script will add it to an 'unk' folder with an incremented number as the folder name.

Code:
#!/bin/bash
imget="/path/to/script.php"
json="/path/to/json/print/file"
gals=$(grep GID ${json} | awk -F '>' '{print $2}' | sed 's/^\s//g')
start=$(pwd)
mkdir -pv "unk"
for g in ${gals}
do
        folder=$(grep -A 2 ${g} ${json} | grep title | awk -F '>' '{print $2}' | sed 's/^\s//g' | sed 's/\s*$//g')

        img_links=$(php ${imget} ${g} | grep URL | awk -F '>' '{print $2}' | sed 's/^\s//g')
        if [ ${#folder} -eq 0 ]
        then
                curr=$(ls unk | wc -l)
                let curr=${curr}+1
                folder="unk/${curr}"
        elif [ -d "${folder}" ]
        then
                for i in `seq 2 50`
                do
                        if [ ! -d "${folder} ${i}" ]
                        then
                                folder="${folder} ${i}"
                                break
                        fi
                done
        fi
        mkdir -pv "${folder}"
        cd "${folder}"
        for i in ${img_links}
        do
                img_url=$(curl -s -L ${i} | grep meta | grep property | grep "og:image" | grep download | awk -F '"' '{print $4}' | sed '/^\s+$/d')
                #echo "${i}"
                #echo "${img_url}"
                wget -c -nc ${img_url}
        done
        cd ${start}
done
The result is nice folders for each gallery

Code:
amanda blue porn.com 86834
amanda blue porn.com 88140
amanda blue pornpros freaksofcock Hummer, Cum Lover
brandy aniston fantasymassage Shizen Massage 21745
brandy aniston fantasymassage Works Every Time 12050
brandy aniston hotbody Bonus
brandy aniston hotbody Bonus - MILF of the Month
brandy aniston hotbody Special Feature 1
brandy aniston hotbody Special Feature 2
brandy aniston penthouse A Fight To The Fuck
brandy aniston penthouse Always A Bridesmaid
brandy aniston penthouse Babysitter: Coincidence
brandy aniston penthouse Behind The Mask
brandy aniston penthouse Brandy Aniston
brandy aniston penthouse Brandy Aniston 2
brandy aniston penthouse Brandy Aniston 3
brandy aniston penthouse Brandy Aniston 4
brandy aniston penthouse Busted Bachelorette
brandy aniston penthouse Dirty Girl
brandy aniston penthouse Fuck Better than You Play
brandy aniston penthouse He Cleans And He Is Dirty
brooke lee adams bangbros assparade ap6031 1
brooke lee adams bangbros assparade ap6031 2
brooke lee adams bangbros assparade ap6241 1
charley chase nuru Charlie Chase And Heather Carolin 4084 2
charley chase nuru Commercial Break 8295
charley chase nuru Fetish Fuck Dolls 03 1620
charley chase nuru Final Exam Practice 8261
charley chase nuru Hole In The Wall 01 2916
charley chase nuru Jet Black Fuel 02 1865
charley chase nuru Panty Pops 02 4291
charley chase nuru Party Of Feet 02 1041
charley chase nuru Party Of Feet 02 1042
charley chase nuru Party Of Feet 02 1043
charley chase nuru Phat Bottom All Stars 5124
charley chase nuru Phat Bottom All Stars 5125
charley chase nuru Phat Bottom Girls 03 3287
charley chase nuru Pound Pussy 02 2835
charley chase nuru Slutty and Sluttier 11 1506
charley chase nuru Slutty And Sluttier 12 2958
charley chase nuru Spandex Loads 9220
charley chase nuru Swallow This 21 5203
charley chase nuru Swallow This 21 5208
charley chase nuru The Chase 8296
charley chase nuru This Isn't Fast Times At Ridgemont High 1530
charley chase nuru Titillating 16489
charley chase nuru White Chicks Gettin Black Balled 36 Part 1 5346
charley chase porn.com 65842 source
charley chase porn.com 69135 source
charley chase porn.com 69185 gallery 2 1024
charley chase porn.com 69350 source
dillion harper pornpros realexgfs Brand New Pearl Necklace reg dillionharper pics
dillion harper pornpros realexgfs College Romance
dillion harper pornpros realexgfs Dillions Last Stand
dillion harper pornpros realexgfs Hotel Hottie
dillion harper pornpros realexgfs Shaved Muff
dillion harper pornpros shadypi The Doctor's Orders
dillion harper pornpros teenbff Bikini Teaser
dillion harper pornpros teenbff Early Morning Romp tbff dillionharper tiffanyfox pics
__________________
My posts are scripted, sorry if the preview images aren't great, but the whole gallery is in the link
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.


If I post any duplicates, please PM me and I will remove them
herkalurk is offline   Reply With Quote
The Following 14 Users Say Thank You to herkalurk For This Useful Post: