help me to re-write this on python pleasssseee :#!/bin/sh
#
# Perform papers' collections update.
# Including https://vx-underground.org
#


# List of Windows links
list_win='Analysis%20and%20Internals Data%20Theft Evasion%20-%20Anti-debugging Evasion%20-%20EDR%20and%20AV%20specific Evasion%20-%20Other Evasion%20-%20Process%20Creation%20and%20Shellcode%20Execution Evasion%20-%20Systems%20Call%20and%20Memory%20Evasion Infection Initial%20Access%20Malcode Kernel%20Mode Network%20Communications Persistence Process%20Injection System%20Components%20and%20Abuse Windows%20Internals%20Series'

# List of Linux links
list_lin='Evasion Infection Kernel%20Mode Persistence Process%20Injection System%20Components%20and%20Abuse'

# List of Other links
list_other='Advanced%20Malware Code%20Mutation Cryptocurrency%20Analysis Internal%20Components%20and%20Analysis Interviews MacOS%20VX Mobile%20VX VXUG%20Zines'

# List of Malware Defense
list_maldef='AV%20Tech Malware%20Analysis'

# List of Russian XSS-коллекция
list_ru='XSS'


fetch_data() {
    echo "Hello, how are you $1 !?"
    cd $1
    echo "dump all links for $2 .."

    curl -iL -H 'User-Agent: Pikabot'  https://vx-underground.org/Papers/$2 | grep samples.vx-underground | perl -ne 'print "$1\n" if /href="([^"]+)"/' | tee  links
    sed -i 's/[[:blank:]]/%20/g' links
    # for lnk in `cat links | awk -F '/' '{print $NF}'`; do
    for lnk in `cat links`; do
        FILE=`echo $lnk | sed 's/%20/ /g' | awk -F '/' '{print $NF}'`
        if [ ! -f "$FILE" ]; then
            wget --header='User-Agent: Pikabot' $lnk;
        fi
    done

    rm links
    cd -
    sleep 2
}

# Windows list
for xs in $list_win ; do
    case $xs in
        "Analysis%20and%20Internals")
            fetch_data "win/Analysis_and_Internals" "Windows/Analysis%20and%20Internals"
        ;;
        "Data%20Theft")
            fetch_data "win/Data_Theft" "Windows/Data%20Theft"
        ;;
        "Evasion%20-%20Anti-debugging")
            fetch_data "win/Evasion_Anti-debugging" "Windows/Evasion%20-%20Anti-debugging"
        ;;
        "Evasion%20-%20EDR%20and%20AV%20specific")
            fetch_data "win/Evasion_EDR_and_AV_specific" "Windows/Evasion%20-%20EDR%20and%20AV%20specific"
        ;;
        "Evasion%20-%20Other")
            fetch_data "win/Evasion_Other" "Windows/Evasion%20-%20Other"
        ;;
        "Evasion%20-%20Process%20Creation%20and%20Shellcode%20Execution")
            fetch_data "win/Evasion_Process_Creation_and_Shellcode_Execution" "Windows/Evasion%20-%20Process%20Creation%20and%20Shellcode%20Execution"
        ;;
        "Evasion%20-%20Systems%20Call%20and%20Memory%20Evasion")
            fetch_data "win/Evasion_Systems_Call_and_Memory_Evasion" "Windows/Evasion%20-%20Systems%20Call%20and%20Memory%20Evasion"
        ;;
        "Infection")
            fetch_data "win/Infection" "Windows/Infection"
        ;;
        "Initial%20Access%20Malcode")
            fetch_data "win/Initial_Access_Malcode" "Windows/Initial%20Access%20Malcode"
        ;;
        "Kernel%20Mode")
            fetch_data "win/Kernel_Mode" "Windows/Kernel%20Mode"
        ;;
        "Network%20Communications")
            fetch_data "win/Network_Communications" "Windows/Network%20Communications"
        ;;
        "Persistence")
            fetch_data "win/Persistence" "Windows/Persistence"
        ;;
        "Process%20Injection")
            fetch_data "win/Process_Injection" "Windows/Process%20Injection"
        ;;
        "System%20Components%20and%20Abuse")
            fetch_data "win/System_Components_and_Abuse" "Windows/System%20Components%20and%20Abuse"
        ;;
        "Windows%20Internals%20Series")
            fetch_data "win/Windows_Internals_Series" "Windows/Windows%20Internals%20Series"
        ;;
    esac
done


# Linux list
for xs in $list_lin ; do
    case $xs in
        "Evasion")
            fetch_data "linux/evasion" "Linux/Evasion"
        ;;
        "Infection")
            fetch_data "linux/infection" "Linux/Infection"
        ;;
        "Kernel%20Mode")
            fetch_data "linux/kernel_mode" "Linux/Kernel%20Mode"
        ;;
        "Persistence")
            fetch_data "linux/persistence" "Linux/Persistence"
        ;;
        "Process%20Injection")
            fetch_data "linux/process_injection" "Linux/Process%20Injection"
        ;;
        "System%20Components%20and%20Abuse")
            fetch_data "linux/system_components_and_abuse" "Linux/System%20Components%20and%20Abuse"
        ;;
    esac
done