GET request while access token is changing

I wrote a python script which sends GET requests to some particular website.
In order to perform this request, I need to attach the access token that I was given when I logged in.
The problem is that the access token is changing each 15 min, and I have to find it over and over again by using Chrome Devtool (Network tab). I was wondering if there is any way to obtain the new token automatically, or any other way to perform this GET request without using this access token but only the credentials (Username and Password) for this website.
Right now, this is how I’m doing this (Notice that the data provided is not real, so please don’t try to use) :

url = "https://www.containers.io/web/alerts"

querystring = {"access_token":"cfc6f6d22f00303fb7ac--f","envId":"58739be2c2","folderId":"active","sortBy":"status"}

headers = {
    'origin': "https://www.containers.io",
    'accept-encoding': "gzip, deflate, br",
    'accept-language': "en-US,en;q=0.9",
    'user-agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36",
    'accept': "application/json, text/plain, */*",
    'referer': "https://www.containers.io",
    'connection': "keep-alive",
    'cache-control': "no-cache",
    }

response = requests.request("GET", url, headers=headers, params=querystring)

JSON_format = response.json()

chrome.storage.local.get not getting data in chrome extension

I am trying to make an extension that requires saving some text (URLs). The setting of the data seems fine, but trying to retrieve the data is the problem.

The extension manifest has both the popup javascript and the content javascript in the content scripts area.

{
    "manifest_version": 2,
    "name": "Extension_Name",
    "version": "0.0.1",
    "browser_action": {
        "default_title": "Extension_title",
        "default_icon": "icon.png",
        "default_popup": "popup.html"
    },
    "permissions": ["storage"],
    "content_scripts": [
        {
            "matches": [
                ""
            ],
            "js": ["content.js","popup.js"]
        }
    ]
}

The urls are stored in the chrome local storage area:

var b = document.getElementById("l"); //l is a button
b.onmouseup = function(){
    var r = prompt("Please enter the website to add.");
    var g = [];
    chrome.storage.local.get("whitelist",function(i){if(i['whitelist']!==undefined){var g = i['whitelist'];}});
    g.push(r);
    chrome.storage.local.set({"whitelist": g}, function(){console.log("done")});
}

This seems to work, and I can manually type in the get function for the data. However I can not find a way for the data to be used in the content.js

//getting website whitelist
d = null;
var inw = false;
chrome.storage.local.get("whitelist",function(p){d = p['whitelist'];}); //why doesnt this work???
console.log(d); //testing (returns null in the console...)
for(var j in d){ //this script doesnt run because d is not set to an array
    alert(window.location.host.replace(/./g,""));
    if(d[j].replace(/./g,"").replace(/:///g,".").split(".")[1] === window.location.host.replace(/./g,"")){
        inw = true;
        alert("true");
    }
}

chrome.storage.local.get not getting data

I am trying to make an extension that requires saving some text (URLs). The setting of the data seems fine, but trying to retrieve the data is the problem.

The extension manifest has both the popup JavaScript and the content JavaScript in the content scripts area.

{
    "manifest_version": 2,
    "name": "Extension_Name",
    "version": "0.0.1",
    "browser_action": {
        "default_title": "Extension_title",
        "default_icon": "icon.png",
        "default_popup": "popup.html"
    },
    "permissions": ["storage"],
    "content_scripts": [
        {
            "matches": [
                ""
            ],
            "js": ["content.js","popup.js"]
        }
    ]
}

The URLs are stored in the Chrome local storage area:

var b = document.getElementById("l"); //l is a button
b.onmouseup = function () {
    var r = prompt("Please enter the website to add.");
    var g = [];
    chrome.storage.local.get("whitelist", function (i) {
        if (i['whitelist'] !== undefined) {
            var g = i['whitelist'];
        }
    });
    g.push(r);
    chrome.storage.local.set({
        "whitelist": g
    }, function () {
        console.log("done")
    });
}

This seems to work, and I can manually type in the get function for the data. However I can not find a way for the data to be used in the content.js

//getting website whitelist
d = null;
var inw = false;
chrome.storage.local.get("whitelist", function (p) {
    d = p['whitelist'];
}); //why doesnt this work???
console.log(d); //testing (returns null in the console...)
for (var j in d) { //this script doesnt run because d is not set to an array
    alert(window.location.host.replace(/./g, ""));
    if (d[j].replace(/./g, "").replace(/:///g, ".")
                               .split(".")[1] === window.location.host.replace(/./g, "")) {
        inw = true;
        alert("true");
    }
}