Jmeter (46) - From entry to advanced level - Jmeter web page image crawler - Part 2 (detailed tutorial)

1 Introduction

The previous article introduced the crawling article. In this article, Brother Hong will briefly introduce how to crawl images and save them to the local computer. There are many beautiful wallpapers or beauties and girls on the Internet. If you want to collect some for yourself, saving them one by one is too time-consuming. Then you can use a crawler and download them in batches.

2. Reptile principle

In fact, this is the same as the previous article. Brother Hong is repeating it again. The principle of Jmeter's crawler is actually very simple. It is to submit a request to the web page, then extract all the returned hrefs, and use the ForEach controller to implement url traversal. Is this explanation very clear? Brother Hong will briefly introduce how to operate it below.

3. A small test of knives

Brother Hong uses a picture website as an example to demonstrate the process and steps for friends or children.

This website is dynamic. Website: https://unsplash.com/

3.1 Start actual combat

1. Because it is a dynamic website, many pictures cannot be found after obtaining the web content. Use the F12 function of the browser to analyze the website's requests and conclude:

Web page dynamic loading request: https://unsplash.com/napi/photos?page=1&per_page=12&order_by=latest, where 1 means how many pages are loaded, and 12 means 12 pictures are loaded each time;

Image download request: https://unsplash.com/photos/xxx/download?force=true, where xxx represents the id of each image.

2. We started using jmeter to crawl images on the website. Open Jemter and create a new thread group, as shown in the figure below:

If you want to learn automated testing, I recommend a set of videos to you. This video can be said to be the number one automated testing tutorial on the entire network played by Bilibili. The number of people online at the same time has reached 1,000, and there are also notes that can be collected and communicated with various channels. Master technical communication: 798478386    

[Updated] A complete collection of the most detailed practical tutorials on Python interface automation testing taught by Bilibili (the latest practical version)_bilibili_bilibili [Updated] A complete collection of the most detailed practical tutorials on Python interface automated testing taught by Bilibili (practical version) The latest version) has a total of 200 videos, including: 1. Why interface automation should be done for interface automation, 2. Overall view of request for interface automation, 3. Interface practice for interface automation, etc. For more exciting videos from UP master, please follow the UP account . icon-default.png?t=N7T8https://www.bilibili.com/video/BV17p4y1B77x/?spm_id_from=333.337

3. Add an http request (sampler->http request) to the thread group. The protocol is https. Enter the URL for the server name and the path for the path. Parameterize 1 in the path and modify 1 to ${id}, as shown in the figure below. Show:

 4. Add parameterized files, configure components -> CSV data file settings, set file paths, encodings, variables, separators, etc., as shown in the figure below:

5. We now need to extract the image ID and use powerful regular expressions to extract it. Let’s first analyze the data returned by the web page request, so Brother Hong adds a viewing result tree and runs Jmeter, as shown in the following figure:

6. Return the result, paste and format it, as shown in the figure below: 


[{
    "id": "nV8K0uguyiw",
    "created_at": "2020-07-01T18:52:47-04:00",
    "updated_at": "2021-05-23T16:16:03-04:00",
    "promoted_at": null,
    "width": 10920,
    "height": 5880,
    "color": "#c0c0c0",
    "blur_hash": "LCFrS10evKpc.S0KM_-;^+E1E1%L",
    "description": null,
    "alt_description": "man in green zip up jacket beside woman in black shirt",
    "urls": {
        "raw": "https://images.unsplash.com/photo-1593643946890-b5b85ade6451?ixid=MnwxMjA3fDF8MXxhbGx8MXx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1",
        "full": "https://images.unsplash.com/photo-1593643946890-b5b85ade6451?crop=entropy\u0026cs=srgb\u0026fm=jpg\u0026ixid=MnwxMjA3fDF8MXxhbGx8MXx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=85",
        "regular": "https://images.unsplash.com/photo-1593643946890-b5b85ade6451?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDF8MXxhbGx8MXx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=1080",
        "small": "https://images.unsplash.com/photo-1593643946890-b5b85ade6451?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDF8MXxhbGx8MXx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=400",
        "thumb": "https://images.unsplash.com/photo-1593643946890-b5b85ade6451?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDF8MXxhbGx8MXx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=200"
    },
    "links": {
        "self": "https://api.unsplash.com/photos/nV8K0uguyiw",
        "html": "https://unsplash.com/photos/nV8K0uguyiw",
        "download": "https://unsplash.com/photos/nV8K0uguyiw/download",
        "download_location": "https://api.unsplash.com/photos/nV8K0uguyiw/download?ixid=MnwxMjA3fDF8MXxhbGx8MXx8fHx8fDJ8fDE2MjE4NDA5ODg"
    },
    "categories": [],
    "likes": 499,
    "liked_by_user": false,
    "current_user_collections": [],
    "sponsorship": {
        "impression_urls": ["https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false\u0026bannerID=8281547\u0026rnd=[timestamp]\u0026gdpr=\u0026gdpr_consent=\u0026redir=https://secure.insightexpressai.com/adserver/1pixel.gif", "https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false\u0026bannerID=8468538\u0026rnd=[timestamp]\u0026DID=mobADID\u0026redir=https://secure.insightexpressai.com/adserver/1pixel.gif"],
        "tagline": "Designed to be the Best",
        "tagline_url": "http://www.dell.com/xps",
        "sponsor": {
            "id": "2DC3GyeqWjI",
            "updated_at": "2021-05-24T03:12:03-04:00",
            "username": "xps",
            "name": "XPS",
            "first_name": "XPS",
            "last_name": null,
            "twitter_username": "Dell",
            "portfolio_url": "http://www.dell.com/xps",
            "bio": "Designed to be the best, with cutting edge technologies, exceptional build quality, unique materials and powerful features.",
            "location": null,
            "links": {
                "self": "https://api.unsplash.com/users/xps",
                "html": "https://unsplash.com/@xps",
                "photos": "https://api.unsplash.com/users/xps/photos",
                "likes": "https://api.unsplash.com/users/xps/likes",
                "portfolio": "https://api.unsplash.com/users/xps/portfolio",
                "following": "https://api.unsplash.com/users/xps/following",
                "followers": "https://api.unsplash.com/users/xps/followers"
            },
            "profile_image": {
                "small": "https://images.unsplash.com/profile-1600096866391-b09a1a53451aimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=32\u0026w=32",
                "medium": "https://images.unsplash.com/profile-1600096866391-b09a1a53451aimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=64\u0026w=64",
                "large": "https://images.unsplash.com/profile-1600096866391-b09a1a53451aimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=128\u0026w=128"
            },
            "instagram_username": "dell",
            "total_collections": 0,
            "total_likes": 0,
            "total_photos": 22,
            "accepted_tos": true,
            "for_hire": false
        }
    },
    "user": {
        "id": "2DC3GyeqWjI",
        "updated_at": "2021-05-24T03:12:03-04:00",
        "username": "xps",
        "name": "XPS",
        "first_name": "XPS",
        "last_name": null,
        "twitter_username": "Dell",
        "portfolio_url": "http://www.dell.com/xps",
        "bio": "Designed to be the best, with cutting edge technologies, exceptional build quality, unique materials and powerful features.",
        "location": null,
        "links": {
            "self": "https://api.unsplash.com/users/xps",
            "html": "https://unsplash.com/@xps",
            "photos": "https://api.unsplash.com/users/xps/photos",
            "likes": "https://api.unsplash.com/users/xps/likes",
            "portfolio": "https://api.unsplash.com/users/xps/portfolio",
            "following": "https://api.unsplash.com/users/xps/following",
            "followers": "https://api.unsplash.com/users/xps/followers"
        },
        "profile_image": {
            "small": "https://images.unsplash.com/profile-1600096866391-b09a1a53451aimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=32\u0026w=32",
            "medium": "https://images.unsplash.com/profile-1600096866391-b09a1a53451aimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=64\u0026w=64",
            "large": "https://images.unsplash.com/profile-1600096866391-b09a1a53451aimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=128\u0026w=128"
        },
        "instagram_username": "dell",
        "total_collections": 0,
        "total_likes": 0,
        "total_photos": 22,
        "accepted_tos": true,
        "for_hire": false
    }
}, {
    "id": "rfgR_SbTC40",
    "created_at": "2021-05-19T10:35:26-04:00",
    "updated_at": "2021-05-24T02:48:01-04:00",
    "promoted_at": "2021-05-24T02:48:01-04:00",
    "width": 3488,
    "height": 5232,
    "color": "#595959",
    "blur_hash": "LFBM*_nOt6tRt8%Ns:Rj0KtlM{Ri",
    "description": null,
    "alt_description": "black ceramic mug on table",
    "urls": {
        "raw": "https://images.unsplash.com/photo-1621434913400-21cc05e8c461?ixid=MnwxMjA3fDB8MXxhbGx8Mnx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1",
        "full": "https://images.unsplash.com/photo-1621434913400-21cc05e8c461?crop=entropy\u0026cs=srgb\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8Mnx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=85",
        "regular": "https://images.unsplash.com/photo-1621434913400-21cc05e8c461?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8Mnx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=1080",
        "small": "https://images.unsplash.com/photo-1621434913400-21cc05e8c461?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8Mnx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=400",
        "thumb": "https://images.unsplash.com/photo-1621434913400-21cc05e8c461?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8Mnx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=200"
    },
    "links": {
        "self": "https://api.unsplash.com/photos/rfgR_SbTC40",
        "html": "https://unsplash.com/photos/rfgR_SbTC40",
        "download": "https://unsplash.com/photos/rfgR_SbTC40/download",
        "download_location": "https://api.unsplash.com/photos/rfgR_SbTC40/download?ixid=MnwxMjA3fDB8MXxhbGx8Mnx8fHx8fDJ8fDE2MjE4NDA5ODg"
    },
    "categories": [],
    "likes": 9,
    "liked_by_user": false,
    "current_user_collections": [],
    "sponsorship": null,
    "user": {
        "id": "JF1D9mtlosI",
        "updated_at": "2021-05-24T02:57:03-04:00",
        "username": "farzadmohamadi",
        "name": "Farzad Mohamadi",
        "first_name": "Farzad",
        "last_name": "Mohamadi",
        "twitter_username": null,
        "portfolio_url": null,
        "bio": null,
        "location": null,
        "links": {
            "self": "https://api.unsplash.com/users/farzadmohamadi",
            "html": "https://unsplash.com/@farzadmohamadi",
            "photos": "https://api.unsplash.com/users/farzadmohamadi/photos",
            "likes": "https://api.unsplash.com/users/farzadmohamadi/likes",
            "portfolio": "https://api.unsplash.com/users/farzadmohamadi/portfolio",
            "following": "https://api.unsplash.com/users/farzadmohamadi/following",
            "followers": "https://api.unsplash.com/users/farzadmohamadi/followers"
        },
        "profile_image": {
            "small": "https://images.unsplash.com/profile-1621171864819-d610eadcd8bdimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=32\u0026w=32",
            "medium": "https://images.unsplash.com/profile-1621171864819-d610eadcd8bdimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=64\u0026w=64",
            "large": "https://images.unsplash.com/profile-1621171864819-d610eadcd8bdimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=128\u0026w=128"
        },
        "instagram_username": null,
        "total_collections": 0,
        "total_likes": 12,
        "total_photos": 9,
        "accepted_tos": true,
        "for_hire": false
    }
}, {
    "id": "cfMW036jByI",
    "created_at": "2020-05-06T15:53:04-04:00",
    "updated_at": "2021-05-24T01:27:02-04:00",
    "promoted_at": "2021-05-24T01:27:02-04:00",
    "width": 3456,
    "height": 5184,
    "color": "#8ca6d9",
    "blur_hash": "LN9a{zMvROjEo~tSV?RiH;x^V?e.",
    "description": null,
    "alt_description": "low angle photography of high rise building",
    "urls": {
        "raw": "https://images.unsplash.com/photo-1588794651085-41fe77330f3e?ixid=MnwxMjA3fDB8MXxhbGx8M3x8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1",
        "full": "https://images.unsplash.com/photo-1588794651085-41fe77330f3e?crop=entropy\u0026cs=srgb\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8M3x8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=85",
        "regular": "https://images.unsplash.com/photo-1588794651085-41fe77330f3e?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8M3x8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=1080",
        "small": "https://images.unsplash.com/photo-1588794651085-41fe77330f3e?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8M3x8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=400",
        "thumb": "https://images.unsplash.com/photo-1588794651085-41fe77330f3e?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8M3x8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=200"
    },
    "links": {
        "self": "https://api.unsplash.com/photos/cfMW036jByI",
        "html": "https://unsplash.com/photos/cfMW036jByI",
        "download": "https://unsplash.com/photos/cfMW036jByI/download",
        "download_location": "https://api.unsplash.com/photos/cfMW036jByI/download?ixid=MnwxMjA3fDB8MXxhbGx8M3x8fHx8fDJ8fDE2MjE4NDA5ODg"
    },
    "categories": [],
    "likes": 40,
    "liked_by_user": false,
    "current_user_collections": [],
    "sponsorship": null,
    "user": {
        "id": "ftB4m4H6ILo",
        "updated_at": "2021-05-24T03:02:09-04:00",
        "username": "hugoclb",
        "name": "Hugo Coulbouée",
        "first_name": "Hugo",
        "last_name": "Coulbouée",
        "twitter_username": "hug0clb",
        "portfolio_url": null,
        "bio": "ðï¸ Annecy, 74\r\nðð¼ââï¸ 19 Ans, Autodidacte  ð· Canon EOS 1200d x 50mm",
        "location": "Annecy",
        "links": {
            "self": "https://api.unsplash.com/users/hugoclb",
            "html": "https://unsplash.com/@hugoclb",
            "photos": "https://api.unsplash.com/users/hugoclb/photos",
            "likes": "https://api.unsplash.com/users/hugoclb/likes",
            "portfolio": "https://api.unsplash.com/users/hugoclb/portfolio",
            "following": "https://api.unsplash.com/users/hugoclb/following",
            "followers": "https://api.unsplash.com/users/hugoclb/followers"
        },
        "profile_image": {
            "small": "https://images.unsplash.com/profile-1588794575070-f8694808367aimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=32\u0026w=32",
            "medium": "https://images.unsplash.com/profile-1588794575070-f8694808367aimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=64\u0026w=64",
            "large": "https://images.unsplash.com/profile-1588794575070-f8694808367aimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=128\u0026w=128"
        },
        "instagram_username": "hugoclb",
        "total_collections": 0,
        "total_likes": 40,
        "total_photos": 39,
        "accepted_tos": true,
        "for_hire": true
    }
}, {
    "id": "ycnvnL4beLo",
    "created_at": "2021-05-23T14:11:36-04:00",
    "updated_at": "2021-05-24T00:30:02-04:00",
    "promoted_at": "2021-05-24T00:30:02-04:00",
    "width": 2160,
    "height": 3240,
    "color": "#d9d9c0",
    "blur_hash": "LcLpXC%LMxrr_MaexaR*%gRkS#bb",
    "description": null,
    "alt_description": "strawberry juice in clear drinking glass",
    "urls": {
        "raw": "https://images.unsplash.com/photo-1621792907789-666f0e69ea03?ixid=MnwxMjA3fDB8MXxhbGx8NHx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1",
        "full": "https://images.unsplash.com/photo-1621792907789-666f0e69ea03?crop=entropy\u0026cs=srgb\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8NHx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=85",
        "regular": "https://images.unsplash.com/photo-1621792907789-666f0e69ea03?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8NHx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=1080",
        "small": "https://images.unsplash.com/photo-1621792907789-666f0e69ea03?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8NHx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=400",
        "thumb": "https://images.unsplash.com/photo-1621792907789-666f0e69ea03?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8NHx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=200"
    },
    "links": {
        "self": "https://api.unsplash.com/photos/ycnvnL4beLo",
        "html": "https://unsplash.com/photos/ycnvnL4beLo",
        "download": "https://unsplash.com/photos/ycnvnL4beLo/download",
        "download_location": "https://api.unsplash.com/photos/ycnvnL4beLo/download?ixid=MnwxMjA3fDB8MXxhbGx8NHx8fHx8fDJ8fDE2MjE4NDA5ODg"
    },
    "categories": [],
    "likes": 22,
    "liked_by_user": false,
    "current_user_collections": [],
    "sponsorship": null,
    "user": {
        "id": "JUx0LN7P8_o",
        "updated_at": "2021-05-24T03:11:59-04:00",
        "username": "bartoshevicz",
        "name": "Adam Bartoszewicz",
        "first_name": "Adam",
        "last_name": "Bartoszewicz",
        "twitter_username": null,
        "portfolio_url": "https://www.instagram.com/bartoshevicz/",
        "bio": "Hi, I'm a foodie passionate and food photography is becoming my whole life! I hope you're gonna enjoy my delicious work. Join me on my Instagram profile for more and more!",
        "location": "BiaÅystok, Poland",
        "links": {
            "self": "https://api.unsplash.com/users/bartoshevicz",
            "html": "https://unsplash.com/@bartoshevicz",
            "photos": "https://api.unsplash.com/users/bartoshevicz/photos",
            "likes": "https://api.unsplash.com/users/bartoshevicz/likes",
            "portfolio": "https://api.unsplash.com/users/bartoshevicz/portfolio",
            "following": "https://api.unsplash.com/users/bartoshevicz/following",
            "followers": "https://api.unsplash.com/users/bartoshevicz/followers"
        },
        "profile_image": {
            "small": "https://images.unsplash.com/profile-1621607600495-1fd693951525image?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=32\u0026w=32",
            "medium": "https://images.unsplash.com/profile-1621607600495-1fd693951525image?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=64\u0026w=64",
            "large": "https://images.unsplash.com/profile-1621607600495-1fd693951525image?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=128\u0026w=128"
        },
        "instagram_username": "bartoshevicz",
        "total_collections": 0,
        "total_likes": 41,
        "total_photos": 26,
        "accepted_tos": true,
        "for_hire": false
    }
}, {
    "id": "5fx4r4qcdXA",
    "created_at": "2021-05-23T13:40:14-04:00",
    "updated_at": "2021-05-24T02:56:53-04:00",
    "promoted_at": "2021-05-24T00:27:02-04:00",
    "width": 5149,
    "height": 3433,
    "color": "#8c8c73",
    "blur_hash": "L9A0XYIC9dxt}@f9ohJA9aX8%1oe",
    "description": null,
    "alt_description": "white and blue smoke illustration",
    "urls": {
        "raw": "https://images.unsplash.com/photo-1621791554700-35b52803f596?ixid=MnwxMjA3fDB8MXxhbGx8NXx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1",
        "full": "https://images.unsplash.com/photo-1621791554700-35b52803f596?crop=entropy\u0026cs=srgb\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8NXx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=85",
        "regular": "https://images.unsplash.com/photo-1621791554700-35b52803f596?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8NXx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=1080",
        "small": "https://images.unsplash.com/photo-1621791554700-35b52803f596?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8NXx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=400",
        "thumb": "https://images.unsplash.com/photo-1621791554700-35b52803f596?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8NXx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=200"
    },
    "links": {
        "self": "https://api.unsplash.com/photos/5fx4r4qcdXA",
        "html": "https://unsplash.com/photos/5fx4r4qcdXA",
        "download": "https://unsplash.com/photos/5fx4r4qcdXA/download",
        "download_location": "https://api.unsplash.com/photos/5fx4r4qcdXA/download?ixid=MnwxMjA3fDB8MXxhbGx8NXx8fHx8fDJ8fDE2MjE4NDA5ODg"
    },
    "categories": [],
    "likes": 33,
    "liked_by_user": false,
    "current_user_collections": [],
    "sponsorship": null,
    "user": {
        "id": "ogQykx6hk_c",
        "updated_at": "2021-05-24T03:22:05-04:00",
        "username": "pawel_czerwinski",
        "name": "Pawel Czerwinski",
        "first_name": "Pawel",
        "last_name": "Czerwinski",
        "twitter_username": null,
        "portfolio_url": "http://paypal.me/pmcze",
        "bio": "If you'd like to support me, you can consider a donation ⤠In case you have any questions about how you can use the photos, please read https://help.unsplash.com/en/collections/1463188-unsplash-license ð ||| www.instagram.com/pmcze",
        "location": "Poland",
        "links": {
            "self": "https://api.unsplash.com/users/pawel_czerwinski",
            "html": "https://unsplash.com/@pawel_czerwinski",
            "photos": "https://api.unsplash.com/users/pawel_czerwinski/photos",
            "likes": "https://api.unsplash.com/users/pawel_czerwinski/likes",
            "portfolio": "https://api.unsplash.com/users/pawel_czerwinski/portfolio",
            "following": "https://api.unsplash.com/users/pawel_czerwinski/following",
            "followers": "https://api.unsplash.com/users/pawel_czerwinski/followers"
        },
        "profile_image": {
            "small": "https://images.unsplash.com/profile-1592328433409-d9ce8a5333eaimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=32\u0026w=32",
            "medium": "https://images.unsplash.com/profile-1592328433409-d9ce8a5333eaimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=64\u0026w=64",
            "large": "https://images.unsplash.com/profile-1592328433409-d9ce8a5333eaimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=128\u0026w=128"
        },
        "instagram_username": "pmcze",
        "total_collections": 21,
        "total_likes": 29930,
        "total_photos": 1118,
        "accepted_tos": true,
        "for_hire": false
    }
}, {
    "id": "DTPY6b0RMRk",
    "created_at": "2021-05-21T00:09:13-04:00",
    "updated_at": "2021-05-24T00:50:37-04:00",
    "promoted_at": null,
 "width": 8688,
    "height": 5792,
    "color": "#f3f3f3",
    "blur_hash": "LeH2cgIUs:-:~qofRjt7xctQWAWC",
    "description": null,
    "alt_description": "woman using Surface laptop",
    "urls": {
        "raw": "https://images.unsplash.com/photo-1621570072965-b25917de6ec9?ixid=MnwxMjA3fDF8MXxhbGx8Nnx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1",
        "full": "https://images.unsplash.com/photo-1621570072965-b25917de6ec9?crop=entropy\u0026cs=srgb\u0026fm=jpg\u0026ixid=MnwxMjA3fDF8MXxhbGx8Nnx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=85",
        "regular": "https://images.unsplash.com/photo-1621570072965-b25917de6ec9?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDF8MXxhbGx8Nnx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=1080",
        "small": "https://images.unsplash.com/photo-1621570072965-b25917de6ec9?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDF8MXxhbGx8Nnx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=400",
        "thumb": "https://images.unsplash.com/photo-1621570072965-b25917de6ec9?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDF8MXxhbGx8Nnx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=200"
    },
    "links": {
        "self": "https://api.unsplash.com/photos/DTPY6b0RMRk",
        "html": "https://unsplash.com/photos/DTPY6b0RMRk",
        "download": "https://unsplash.com/photos/DTPY6b0RMRk/download",
        "download_location": "https://api.unsplash.com/photos/DTPY6b0RMRk/download?ixid=MnwxMjA3fDF8MXxhbGx8Nnx8fHx8fDJ8fDE2MjE4NDA5ODg"
    },
    "categories": [],
    "likes": 5,
    "liked_by_user": false,
    "current_user_collections": [],
    "sponsorship": {
        "impression_urls": ["https://secure.insightexpressai.com/adServer/adServerESI.aspx?script=false\u0026bannerID=8742296\u0026rnd=[timestamp]\u0026redir=https://secure.insightexpressai.com/adserver/1pixel.gif"],
        "tagline": "Original by design",
        "tagline_url": null,
        "sponsor": {
            "id": "N-JSeSTCz68",
            "updated_at": "2021-05-24T02:56:58-04:00",
            "username": "surface",
            "name": "Surface",
            "first_name": "Surface",
            "last_name": null,
            "twitter_username": "surface",
            "portfolio_url": "http://surface.com",
            "bio": "Follow us @Surface. #OriginalByDesign",
            "location": null,
            "links": {
                "self": "https://api.unsplash.com/users/surface",
                "html": "https://unsplash.com/@surface",
                "photos": "https://api.unsplash.com/users/surface/photos",
                "likes": "https://api.unsplash.com/users/surface/likes",
                "portfolio": "https://api.unsplash.com/users/surface/portfolio",
                "following": "https://api.unsplash.com/users/surface/following",
                "followers": "https://api.unsplash.com/users/surface/followers"
            },
            "profile_image": {
                "small": "https://images.unsplash.com/profile-1587651800415-20eed2ec0209image?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=32\u0026w=32",
                "medium": "https://images.unsplash.com/profile-1587651800415-20eed2ec0209image?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=64\u0026w=64",
                "large": "https://images.unsplash.com/profile-1587651800415-20eed2ec0209image?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=128\u0026w=128"
            },
            "instagram_username": "surface",
            "total_collections": 0,
            "total_likes": 0,
            "total_photos": 141,
            "accepted_tos": true,
            "for_hire": false
        }
    },
    "user": {
        "id": "N-JSeSTCz68",
        "updated_at": "2021-05-24T02:56:58-04:00",
        "username": "surface",
        "name": "Surface",
        "first_name": "Surface",
        "last_name": null,
        "twitter_username": "surface",
        "portfolio_url": "http://surface.com",
        "bio": "Follow us @Surface. #OriginalByDesign",
        "location": null,
        "links": {
            "self": "https://api.unsplash.com/users/surface",
            "html": "https://unsplash.com/@surface",
            "photos": "https://api.unsplash.com/users/surface/photos",
            "likes": "https://api.unsplash.com/users/surface/likes",
            "portfolio": "https://api.unsplash.com/users/surface/portfolio",
            "following": "https://api.unsplash.com/users/surface/following",
            "followers": "https://api.unsplash.com/users/surface/followers"
        },
        "profile_image": {
            "small": "https://images.unsplash.com/profile-1587651800415-20eed2ec0209image?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=32\u0026w=32",
            "medium": "https://images.unsplash.com/profile-1587651800415-20eed2ec0209image?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=64\u0026w=64",
            "large": "https://images.unsplash.com/profile-1587651800415-20eed2ec0209image?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=128\u0026w=128"
        },
        "instagram_username": "surface",
        "total_collections": 0,
        "total_likes": 0,
        "total_photos": 141,
        "accepted_tos": true,
        "for_hire": false
    }
}, {
    "id": "TxgPq_TRXtQ",
    "created_at": "2021-05-22T16:33:09-04:00",
    "updated_at": "2021-05-23T23:57:01-04:00",
    "promoted_at": "2021-05-23T23:57:01-04:00",
    "width": 1889,
    "height": 2700,
    "color": "#26260c",
    "blur_hash": "LEC7TPl9tkNe-oi^tkoy?]IBIBxt",
    "description": null,
    "alt_description": "black and brown car steering wheel",
    "urls": {
        "raw": "https://images.unsplash.com/photo-1621715070889-7bcdef6fdcf9?ixid=MnwxMjA3fDB8MXxhbGx8N3x8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1",
        "full": "https://images.unsplash.com/photo-1621715070889-7bcdef6fdcf9?crop=entropy\u0026cs=srgb\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8N3x8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=85",
        "regular": "https://images.unsplash.com/photo-1621715070889-7bcdef6fdcf9?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8N3x8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=1080",
        "small": "https://images.unsplash.com/photo-1621715070889-7bcdef6fdcf9?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8N3x8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=400",
        "thumb": "https://images.unsplash.com/photo-1621715070889-7bcdef6fdcf9?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8N3x8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=200"
    },
    "links": {
        "self": "https://api.unsplash.com/photos/TxgPq_TRXtQ",
        "html": "https://unsplash.com/photos/TxgPq_TRXtQ",
        "download": "https://unsplash.com/photos/TxgPq_TRXtQ/download",
        "download_location": "https://api.unsplash.com/photos/TxgPq_TRXtQ/download?ixid=MnwxMjA3fDB8MXxhbGx8N3x8fHx8fDJ8fDE2MjE4NDA5ODg"
    },
    "categories": [],
    "likes": 23,
    "liked_by_user": false,
    "current_user_collections": [],
    "sponsorship": null,
    "user": {
        "id": "bCBUCaMNruM",
        "updated_at": "2021-05-24T03:12:07-04:00",
        "username": "kapsan",
        "name": "Christian Casapu",
        "first_name": "Christian",
        "last_name": "Casapu",
        "twitter_username": null,
        "portfolio_url": null,
        "bio": null,
        "location": "Chisinau, R.Moldova",
        "links": {
            "self": "https://api.unsplash.com/users/kapsan",
            "html": "https://unsplash.com/@kapsan",
            "photos": "https://api.unsplash.com/users/kapsan/photos",
            "likes": "https://api.unsplash.com/users/kapsan/likes",
            "portfolio": "https://api.unsplash.com/users/kapsan/portfolio",
            "following": "https://api.unsplash.com/users/kapsan/following",
            "followers": "https://api.unsplash.com/users/kapsan/followers"
        },
        "profile_image": {
            "small": "https://images.unsplash.com/profile-1579130062098-16c790ae3ccdimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=32\u0026w=32",
            "medium": "https://images.unsplash.com/profile-1579130062098-16c790ae3ccdimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=64\u0026w=64",
            "large": "https://images.unsplash.com/profile-1579130062098-16c790ae3ccdimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=128\u0026w=128"
        },
        "instagram_username": "kapsann",
        "total_collections": 0,
        "total_likes": 37,
        "total_photos": 10,
        "accepted_tos": true,
        "for_hire": true
    }
}, {
    "id": "m3mYumV2lag",
    "created_at": "2021-05-23T12:32:40-04:00",
    "updated_at": "2021-05-23T23:03:01-04:00",
    "promoted_at": "2021-05-23T23:03:01-04:00",
    "width": 3690,
    "height": 5535,
    "color": "#f3f3f3",
    "blur_hash": "L]JuP^t6a#j]_4s:j@a}oJs:jZWV",
    "description": "Three men standing in green field in front of Grand Teton mountain range",
    "alt_description": null,
    "urls": {
        "raw": "https://images.unsplash.com/photo-1621787211915-83d2cbcf8946?ixid=MnwxMjA3fDB8MXxhbGx8OHx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1",
        "full": "https://images.unsplash.com/photo-1621787211915-83d2cbcf8946?crop=entropy\u0026cs=srgb\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8OHx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=85",
        "regular": "https://images.unsplash.com/photo-1621787211915-83d2cbcf8946?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8OHx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=1080",
        "small": "https://images.unsplash.com/photo-1621787211915-83d2cbcf8946?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8OHx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=400",
        "thumb": "https://images.unsplash.com/photo-1621787211915-83d2cbcf8946?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8OHx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=200"
    },
    "links": {
        "self": "https://api.unsplash.com/photos/m3mYumV2lag",
        "html": "https://unsplash.com/photos/m3mYumV2lag",
        "download": "https://unsplash.com/photos/m3mYumV2lag/download",
        "download_location": "https://api.unsplash.com/photos/m3mYumV2lag/download?ixid=MnwxMjA3fDB8MXxhbGx8OHx8fHx8fDJ8fDE2MjE4NDA5ODg"
    },
    "categories": [],
    "likes": 20,
    "liked_by_user": false,
    "current_user_collections": [],
    "sponsorship": null,
    "user": {
        "id": "MpbJ8qGW8bo",
        "updated_at": "2021-05-24T03:02:11-04:00",
        "username": "jonahbrown",
        "name": "Jonah Brown",
        "first_name": "Jonah",
        "last_name": "Brown",
        "twitter_username": "jonahbrown24",
        "portfolio_url": "https://www.youtube.com/channel/UCxkaphHTf-hlcrh6-Q6FPLg/videos",
        "bio": "Michigan based filmmaker that likes to snap photos between takes.",
        "location": "Kalamazoo, MI",
        "links": {
            "self": "https://api.unsplash.com/users/jonahbrown",
            "html": "https://unsplash.com/@jonahbrown",
            "photos": "https://api.unsplash.com/users/jonahbrown/photos",
            "likes": "https://api.unsplash.com/users/jonahbrown/likes",
            "portfolio": "https://api.unsplash.com/users/jonahbrown/portfolio",
            "following": "https://api.unsplash.com/users/jonahbrown/following",
            "followers": "https://api.unsplash.com/users/jonahbrown/followers"
        },
        "profile_image": {
            "small": "https://images.unsplash.com/profile-1605920877157-3a1ac2126072image?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=32\u0026w=32",
            "medium": "https://images.unsplash.com/profile-1605920877157-3a1ac2126072image?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=64\u0026w=64",
            "large": "https://images.unsplash.com/profile-1605920877157-3a1ac2126072image?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=128\u0026w=128"
        },
        "instagram_username": "joenuh",
        "total_collections": 0,
        "total_likes": 5,
        "total_photos": 124,
        "accepted_tos": true,
        "for_hire": true
    }
}, {
    "id": "Pu9uW0IHNEg",
    "created_at": "2021-05-22T16:47:43-04:00",
    "updated_at": "2021-05-24T03:21:57-04:00",
    "promoted_at": "2021-05-23T20:36:01-04:00",
    "width": 3225,
    "height": 4837,
    "color": "#f3f3f3",
    "blur_hash": "LvNA6m-;M{of9FR%R%WB0JofxbWB",
    "description": null,
    "alt_description": "woman in brown jacket standing beside white wall",
    "urls": {
        "raw": "https://images.unsplash.com/photo-1621716456281-f6d0ce70764f?ixid=MnwxMjA3fDB8MXxhbGx8OXx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1",
        "full": "https://images.unsplash.com/photo-1621716456281-f6d0ce70764f?crop=entropy\u0026cs=srgb\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8OXx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=85",
        "regular": "https://images.unsplash.com/photo-1621716456281-f6d0ce70764f?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8OXx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=1080",
        "small": "https://images.unsplash.com/photo-1621716456281-f6d0ce70764f?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8OXx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=400",
        "thumb": "https://images.unsplash.com/photo-1621716456281-f6d0ce70764f?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8OXx8fHx8fDJ8fDE2MjE4NDA5ODg\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=200"
    },
    "links": {
        "self": "https://api.unsplash.com/photos/Pu9uW0IHNEg",
        "html": "https://unsplash.com/photos/Pu9uW0IHNEg",
        "download": "https://unsplash.com/photos/Pu9uW0IHNEg/download",
        "download_location": "https://api.unsplash.com/photos/Pu9uW0IHNEg/download?ixid=MnwxMjA3fDB8MXxhbGx8OXx8fHx8fDJ8fDE2MjE4NDA5ODg"
    },
    "categories": [],
    "likes": 17,
    "liked_by_user": false,
    "current_user_collections": [],
    "sponsorship": null,
    "user": {
        "id": "ftB4m4H6ILo",
        "updated_at": "2021-05-24T03:02:09-04:00",
        "username": "hugoclb",
        "name": "Hugo Coulbouée",
        "first_name": "Hugo",
        "last_name": "Coulbouée",
        "twitter_username": "hug0clb",
        "portfolio_url": null,
        "bio": "ðï¸ Annecy, 74\r\nðð¼ââï¸ 19 Ans, Autodidacte  ð· Canon EOS 1200d x 50mm",
        "location": "Annecy",
        "links": {
            "self": "https://api.unsplash.com/users/hugoclb",
            "html": "https://unsplash.com/@hugoclb",
            "photos": "https://api.unsplash.com/users/hugoclb/photos",
            "likes": "https://api.unsplash.com/users/hugoclb/likes",
            "portfolio": "https://api.unsplash.com/users/hugoclb/portfolio",
            "following": "https://api.unsplash.com/users/hugoclb/following",
            "followers": "https://api.unsplash.com/users/hugoclb/followers"
        },
        "profile_image": {
            "small": "https://images.unsplash.com/profile-1588794575070-f8694808367aimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=32\u0026w=32",
            "medium": "https://images.unsplash.com/profile-1588794575070-f8694808367aimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=64\u0026w=64",
            "large": "https://images.unsplash.com/profile-1588794575070-f8694808367aimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=128\u0026w=128"
        },
        "instagram_username": "hugoclb",
        "total_collections": 0,
        "total_likes": 40,
        "total_photos": 39,
        "accepted_tos": true,
        "for_hire": true
    }
}, {
    "id": "G_iXK9l8l7Q",
    "created_at": "2021-05-21T14:20:27-04:00",
    "updated_at": "2021-05-23T20:21:02-04:00",
    "promoted_at": "2021-05-23T20:21:02-04:00",
    "width": 3998,
    "height": 4997,
    "color": "#262626",
    "blur_hash": "LUA^UYt7Rjxu_NofRjxu_3ofV@t7",
    "description": null,
    "alt_description": "green trees on brown wooden bridge during daytime",
    "urls": {
        "raw": "https://images.unsplash.com/photo-1621620844630-ecd55a95b7ff?ixid=MnwxMjA3fDB8MXxhbGx8MTB8fHx8fHwyfHwxNjIxODQwOTg4\u0026ixlib=rb-1.2.1",
        "full": "https://images.unsplash.com/photo-1621620844630-ecd55a95b7ff?crop=entropy\u0026cs=srgb\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8MTB8fHx8fHwyfHwxNjIxODQwOTg4\u0026ixlib=rb-1.2.1\u0026q=85",
        "regular": "https://images.unsplash.com/photo-1621620844630-ecd55a95b7ff?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8MTB8fHx8fHwyfHwxNjIxODQwOTg4\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=1080",
        "small": "https://images.unsplash.com/photo-1621620844630-ecd55a95b7ff?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8MTB8fHx8fHwyfHwxNjIxODQwOTg4\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=400",
        "thumb": "https://images.unsplash.com/photo-1621620844630-ecd55a95b7ff?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8MTB8fHx8fHwyfHwxNjIxODQwOTg4\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=200"
    },
    "links": {
        "self": "https://api.unsplash.com/photos/G_iXK9l8l7Q",
        "html": "https://unsplash.com/photos/G_iXK9l8l7Q",
        "download": "https://unsplash.com/photos/G_iXK9l8l7Q/download",
        "download_location": "https://api.unsplash.com/photos/G_iXK9l8l7Q/download?ixid=MnwxMjA3fDB8MXxhbGx8MTB8fHx8fHwyfHwxNjIxODQwOTg4"
    },
    "categories": [],
    "likes": 43,
    "liked_by_user": false,
    "current_user_collections": [],
    "sponsorship": null,
    "user": {
        "id": "piOet34tl5o",
        "updated_at": "2021-05-24T03:07:10-04:00",
        "username": "nathanmcdine",
        "name": "Nathan McDine",
        "first_name": "Nathan",
        "last_name": "McDine",
        "twitter_username": "nathanmcdine",
        "portfolio_url": "https://www.nathanmcdine.co.uk",
        "bio": "Photographer | Marketer ð¸\r\n If you like my content, be sure to check out my Instagram (@nathanmcdine).",
        "location": "UK",
        "links": {
            "self": "https://api.unsplash.com/users/nathanmcdine",
            "html": "https://unsplash.com/@nathanmcdine",
            "photos": "https://api.unsplash.com/users/nathanmcdine/photos",
            "likes": "https://api.unsplash.com/users/nathanmcdine/likes",
            "portfolio": "https://api.unsplash.com/users/nathanmcdine/portfolio",
            "following": "https://api.unsplash.com/users/nathanmcdine/following",
            "followers": "https://api.unsplash.com/users/nathanmcdine/followers"
        },
        "profile_image": {
            "small": "https://images.unsplash.com/profile-1621620707567-e2050adbc1eaimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=32\u0026w=32",
            "medium": "https://images.unsplash.com/profile-1621620707567-e2050adbc1eaimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=64\u0026w=64",
            "large": "https://images.unsplash.com/profile-1621620707567-e2050adbc1eaimage?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=128\u0026w=128"
        },
        "instagram_username": "nathanmcdine",
        "total_collections": 2,
        "total_likes": 245,
        "total_photos": 143,
        "accepted_tos": true,
        "for_hire": true
    }
}, {
    "id": "k94wMXMHFbE",
    "created_at": "2021-05-23T01:27:15-04:00",
    "updated_at": "2021-05-24T01:25:07-04:00",
    "promoted_at": "2021-05-23T20:06:02-04:00",
    "width": 5584,
    "height": 8368,
    "color": "#d9d9d9",
    "blur_hash": "LvHMDpM{j]ay_4RkbFj[X9W=ayay",
    "description": null,
    "alt_description": "green lake near mountain during daytime",
    "urls": {
        "raw": "https://images.unsplash.com/photo-1621747609281-38853764c986?ixid=MnwxMjA3fDB8MXxhbGx8MTF8fHx8fHwyfHwxNjIxODQwOTg4\u0026ixlib=rb-1.2.1",
        "full": "https://images.unsplash.com/photo-1621747609281-38853764c986?crop=entropy\u0026cs=srgb\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8MTF8fHx8fHwyfHwxNjIxODQwOTg4\u0026ixlib=rb-1.2.1\u0026q=85",
        "regular": "https://images.unsplash.com/photo-1621747609281-38853764c986?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8MTF8fHx8fHwyfHwxNjIxODQwOTg4\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=1080",
        "small": "https://images.unsplash.com/photo-1621747609281-38853764c986?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8MTF8fHx8fHwyfHwxNjIxODQwOTg4\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=400",
        "thumb": "https://images.unsplash.com/photo-1621747609281-38853764c986?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8MTF8fHx8fHwyfHwxNjIxODQwOTg4\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=200"
    },
    "links": {
        "self": "https://api.unsplash.com/photos/k94wMXMHFbE",
        "html": "https://unsplash.com/photos/k94wMXMHFbE",
        "download": "https://unsplash.com/photos/k94wMXMHFbE/download",
        "download_location": "https://api.unsplash.com/photos/k94wMXMHFbE/download?ixid=MnwxMjA3fDB8MXxhbGx8MTF8fHx8fHwyfHwxNjIxODQwOTg4"
    },
    "categories": [],
    "likes": 63,
    "liked_by_user": false,
    "current_user_collections": [],
    "sponsorship": null,
    "user": {
        "id": "NyI9CHJbx1I",
        "updated_at": "2021-05-24T03:02:12-04:00",
        "username": "visuallert",
        "name": "Jonas Allert",
        "first_name": "Jonas",
        "last_name": "Allert",
        "twitter_username": null,
        "portfolio_url": "http://visenda.com",
        "bio": "hi, I'm looking forward to share awesomeness here!",
        "location": "ulm, germany",
        "links": {
            "self": "https://api.unsplash.com/users/visuallert",
            "html": "https://unsplash.com/@visuallert",
            "photos": "https://api.unsplash.com/users/visuallert/photos",
            "likes": "https://api.unsplash.com/users/visuallert/likes",
            "portfolio": "https://api.unsplash.com/users/visuallert/portfolio",
            "following": "https://api.unsplash.com/users/visuallert/following",
            "followers": "https://api.unsplash.com/users/visuallert/followers"
        },
        "profile_image": {
            "small": "https://images.unsplash.com/profile-1601380918797-a7236651e5f0image?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=32\u0026w=32",
            "medium": "https://images.unsplash.com/profile-1601380918797-a7236651e5f0image?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=64\u0026w=64",
            "large": "https://images.unsplash.com/profile-1601380918797-a7236651e5f0image?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=128\u0026w=128"
        },
        "instagram_username": "visuallert",
        "total_collections": 3,
        "total_likes": 124,
        "total_photos": 120,
        "accepted_tos": true,
        "for_hire": true
    }
}, {
    "id": "rMXsuun3CuQ",
    "created_at": "2021-05-20T11:09:09-04:00",
    "updated_at": "2021-05-23T20:00:01-04:00",
    "promoted_at": "2021-05-23T20:00:01-04:00",
    "width": 6720,
    "height": 4480,
    "color": "#d9a6a6",
    "blur_hash": "LIKc*1wG0f9s^hVr-oxrScWBr=t3",
    "description": null,
    "alt_description": null,
    "urls": {
        "raw": "https://images.unsplash.com/photo-1621523133136-cea844f32bdf?ixid=MnwxMjA3fDB8MXxhbGx8MTJ8fHx8fHwyfHwxNjIxODQwOTg4\u0026ixlib=rb-1.2.1",
        "full": "https://images.unsplash.com/photo-1621523133136-cea844f32bdf?crop=entropy\u0026cs=srgb\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8MTJ8fHx8fHwyfHwxNjIxODQwOTg4\u0026ixlib=rb-1.2.1\u0026q=85",
        "regular": "https://images.unsplash.com/photo-1621523133136-cea844f32bdf?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8MTJ8fHx8fHwyfHwxNjIxODQwOTg4\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=1080",
        "small": "https://images.unsplash.com/photo-1621523133136-cea844f32bdf?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8MTJ8fHx8fHwyfHwxNjIxODQwOTg4\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=400",
        "thumb": "https://images.unsplash.com/photo-1621523133136-cea844f32bdf?crop=entropy\u0026cs=tinysrgb\u0026fit=max\u0026fm=jpg\u0026ixid=MnwxMjA3fDB8MXxhbGx8MTJ8fHx8fHwyfHwxNjIxODQwOTg4\u0026ixlib=rb-1.2.1\u0026q=80\u0026w=200"
    },
    "links": {
        "self": "https://api.unsplash.com/photos/rMXsuun3CuQ",
        "html": "https://unsplash.com/photos/rMXsuun3CuQ",
        "download": "https://unsplash.com/photos/rMXsuun3CuQ/download",
        "download_location": "https://api.unsplash.com/photos/rMXsuun3CuQ/download?ixid=MnwxMjA3fDB8MXxhbGx8MTJ8fHx8fHwyfHwxNjIxODQwOTg4"
    },
    "categories": [],
    "likes": 20,
    "liked_by_user": false,
    "current_user_collections": [],
    "sponsorship": null,
    "user": {
        "id": "M8EEMP5UPD8",
        "updated_at": "2021-05-24T02:41:56-04:00",
        "username": "colincyruz",
        "name": "Colin Michel",
        "first_name": "Colin",
        "last_name": "Michel",
        "twitter_username": null,
        "portfolio_url": null,
        "bio": null,
        "location": null,
        "links": {
            "self": "https://api.unsplash.com/users/colincyruz",
            "html": "https://unsplash.com/@colincyruz",
            "photos": "https://api.unsplash.com/users/colincyruz/photos",
            "likes": "https://api.unsplash.com/users/colincyruz/likes",
            "portfolio": "https://api.unsplash.com/users/colincyruz/portfolio",
            "following": "https://api.unsplash.com/users/colincyruz/following",
            "followers": "https://api.unsplash.com/users/colincyruz/followers"
        },
        "profile_image": {
            "small": "https://images.unsplash.com/profile-fb-1621522556-3815074e04d0.jpg?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=32\u0026w=32",
            "medium": "https://images.unsplash.com/profile-fb-1621522556-3815074e04d0.jpg?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=64\u0026w=64",
            "large": "https://images.unsplash.com/profile-fb-1621522556-3815074e04d0.jpg?ixlib=rb-1.2.1\u0026q=80\u0026fm=jpg\u0026crop=faces\u0026cs=tinysrgb\u0026fit=crop\u0026h=128\u0026w=128"
        },
        "instagram_username": null,
        "total_collections": 0,
        "total_likes": 0,
        "total_photos": 9,
        "accepted_tos": true,
        "for_hire": false
    }
}]

6. What is returned from above is in json format, and the first id is the image id. We can use the id to extract data, "id":"(.*?)" , the data in brackets is the data that needs to be extracted. As shown below:

7. From the picture above, we can clearly see that the total number of regular matches is 26, which far exceeds the total number of pictures, 12, so other IDs are extracted. We continue to analyze and see that there is also an id in the user. This id is not the id of the picture. If you use this id to download the picture, a 404 error will be reported. We will extract this id using the regular rule just now. Continue to analyze the data and find the download link. Each picture is the same except for the ID. There is no such link in the user. We use this link to extract the data "  download":"https://unsplash.com/photos/(.* ?)/download . As shown in the figure below:

 8. From the picture above, we see that the total number of extracted matches is 12, which is correct. Therefore, we need to add a regular extractor and fill in the above regular expressions into the regular extractor. Remember to fill in -1 for the matching number and add all matches. Extract it, as shown below:

9. Let’s add a sampler->Debug Sampler to see if the data we want is really taken out, as shown in the figure below:

 

10. After saving, run Jmeter, click to view the result tree, and view the retrieved data, indicating that the ID has been retrieved by us, as shown in the following figure:

11. Next we need to use our foreach controller to traverse all ids and enter the variable name in the controller, which is the variable name in the regular expression, as shown in the following figure:

 12. Add another http request under the foreach controller for downloading pictures, which is the download picture request we wrote at the beginning. The settings are consistent with the first http request. Remember to parameterize the id and use the variable name in the expression. Yes, as shown below:

 13. After sending the image download request, we use beanshell to save the image locally. Under the request, add a post-processor -> BeanShell PostProcessor and write a script to save the image, as shown in the following figure:

14. The reference code for saving the picture script is as follows:


import java.io.*;
import java.text.SimpleDateFormat;
import java.util.Date;

Date date = new Date();
date.getDate();
SimpleDateFormat df = new SimpleDateFormat("yyyymmdd-HHmmss");
String formate = df.format(date);
//string name = vars.get("imgid");
byte[] result = prev.getResponseData();  //这个是获取到请求返回的数据,prev是获取上个请求的返回
String file_name = "E:\\photos\\" + formate + ".jpg"; //代表存放文件的位置和文件名
File file = new File(file_name);
FileOutputStream out = new FileOutputStream(file);
out.write(result);
out.close();

 15. Now we can witness the miraculous moment. After the operation is completed, you can see the running results by looking at the result tree. In the storage path, you can see the downloaded pictures, as shown in the figure below:

 

4. Summary

1. When saving to a local image, you need to create the path written in your code, or if it is judged in the code, it will not be created, and if it is not, it will be created.
2. Mainly check whether your regular expression really extracts the data you need.
3. A careful friend saw that I only have 12 pictures here, but the parameters can be cycled 3 times, 36 pictures. What's going on? That's because Brother Hong's thread group is 1, so there are 12 pictures.
4. Proficient in the use of regular expressions. The most important step here is to use regular expressions to extract the key data we want

Okay, that’s it for the Jmeter crawler. In fact, the content is almost the same as the previous article.

 

Guess you like

Origin blog.csdn.net/Faith_Lzt/article/details/133043747