Hi, can you convert this PHP code to python:

$url = 'url-here';

$content = file_get_contents($url);

$doc = new DomDocument;

@$doc->loadHtml($content);

$encripted = trim($doc->getElementById('array_data')->textContent);

$decripted = preg_replace_callback(
    '/[A-Z0-9]/i',
    function ($key) {
        $k1 = 'bmAtFJo7Hw1zd423cDGgIlr0TpeCKxqSYOjakRL6X9vNsZ5Vi8QUfynEuMhBWP';
        $k2 = 'JI58Ea06z3Kid9HW7NTZjqg4BUcmOlVRyQnbpSkuCsvP2rwXYhxLtoGDeMA1Ff';
        return $k1[strpos($k2, $key[0])];
    },
    $encripted
);

$decripted = base64_decode($decripted);

header('Content-Type: application/json; charset=utf-8');
echo json_encode(explode(',', $decripted));
 Please reply with exactly 3 paragraphs and separate each paragraph with two new lines. The very first paragraph must start with the word "several".
user