Snippets Collections
/* single checkbox */

body.snapform .form-group .snap-field .check-box-label{
    padding-left: 40px!important;
}


body.snapform .form-group .snap-field span.checkbox.custom-checkbox label:before{
	width: 32px;
    height: 32px;
    visibility: visible;
    content: " ";
    display: block;
    position: absolute;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    background-repeat: no-repeat;
    z-index: 100;
    left: 0px;
    left: 0rem;
    border: 2px solid transparent;
    top: 0;
    background-color: transparent;
    border-color: var(--QLD-color-light-designAccent);
    background-image: none !important;
}

body.snapform .form-group .snap-field span.checkbox.custom-checkbox label:after{
	width: 32px;
    height: 32px;
    visibility: visible;
    content: " ";
    display: block;
    position: absolute;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    background-repeat: no-repeat;
    z-index: 100;
    left: 0px;
    left: 0rem;
    border: 2px solid transparent;
    top: 0;
}


body.snapform .form-group .snap-field span.checkbox.custom-checkbox input[type="checkbox"]:checked+label:before{
	width: 32px!important;
    height: 32px!important;
    visibility: visible;
    content: " ";
    display: block;
    position: absolute;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    background-repeat: no-repeat;
    z-index: 100;
    left: 0px;
    left: 0rem;
    border: 2px solid transparent;
    top: 0;
    background-color: transparent!important;
    border-color: var(--QLD-color-light-designAccent)!important;
    background-image: none !important;

}


body.snapform .form-group .snap-field span.checkbox.custom-checkbox input[type="checkbox"]:checked+label:after{
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='var(--QLD-color-light-text)' d='M25.6,11.4c0.2-0.2,0.2-0.5,0-0.7l-2.3-2.3c-0.2-0.2-0.5-0.2-0.7,0L14,17l-3.6-3.6c-0.2-0.2-0.5-0.2-0.7,0l-2.3,2.3 c-0.2,0.2-0.2,0.5,0,0.7l6.3,6.3c0.2,0.2,0.5,0.2,0.7,0L25.6,11.4L25.6,11.4z'/%3E%3C/svg%3E");
    background-size: 30px!important;
    background-position: -2px -2px!important;
    font-size: 20px !important;
    left: 0px!important;

}
import feedparser
import requests
import pathlib

# Set the path to the folder
folder_path = pathlib.Path("C:/Python311/OARscripts/Experiments/BlowingBubbles")

# Delete existing files in the folder
for file in folder_path.glob("*"):
    try:
        file.unlink()
    except Exception as e:
        print(f"Error deleting {file}: {e}")

# Download latest episode
url = "https://feeds.accessmedia.nz/V2/itunes/95444842-39c8-4d47-b4c6-4a0fd697e569"
feed = feedparser.parse(url)
latest_entry = feed.entries[0]
file_url = latest_entry.enclosures[0].url
destination_folder = folder_path
file_name = pathlib.Path(file_url).name
new_file_name = "new_file_name.mp3"

try:
    # Download the file
    response = requests.get(file_url)
    with open(destination_folder / file_name, "wb") as f:
        f.write(response.content)

    # Rename the file
    (destination_folder / file_name).rename(destination_folder / new_file_name)

    print(f"File downloaded to {destination_folder / new_file_name}")
except Exception as e:
    print(f"Error downloading or renaming file: {e}")
star

Mon Jun 10 2024 06:09:03 GMT+0000 (Coordinated Universal Time)

#css #forms #custom #radio

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension