C2_W2_Assignment_Exercise_3

When execute the code for the assignment I get that
Is not the url be changing to get the next page instead of repeating ?

for below code that is
responses_with_next = paginated_with_next_new_releases(endpoint_request=get_new_releases,
url=URL_NEW_RELEASES,
access_token=token.get(‘access_token’))

Hello @ebrolove,

Could you check in Exercise 1 you are using the correct url (url=request_url). Hope it helps

The url is correct
If you noticed it is the next_page parameter that is not getting updated.
I believe my code is bad and the parameter is not getting updated.

Hello @ebrolove,

Does your offset updates and get the expected output when you run this code after Exercise 2:

responses = paginated_new_releases(endpoint_request=get_new_releases,
                                   url=URL_NEW_RELEASES, 
                                   access_token=token.get('access_token'), 
                                   offset=0, limit=20

)

I could reproduce the same error if I used url=url instead of url=request_url in get_new_releases function. Hope it helps

You are the man!!!

I actually hard coded the value. And I just replaced the hardcoded value to url=request_url and that got be past my issue!

Can I buy you coffee or lunch ? LOL

Thanks for your time and knowledge and willingness to help.

2 Likes

What was the Solution I am also getting the same error.

Reassign the value of next_page as the ‘next’ value from the response[“albums”] dictionary.

    next_page = response["albums"].get(next)

I got the solution using right syntax