Просмотр предыдущей версии от 25.08.2026 14:11


Find-me-estrogen

Find-me-estrogen.sh is a shell script to semi-automatial parsing of DIY HRT shops.

License

This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://wtfpl.net for more details.

s="estradiol-enanthate
estradiol-valerate
estradiol-cypionate"

get(){
   curl -s "https://$1/$2/" | sed 's/></>\n</g' | grep ' class' | grep 'in-stock\|out-of-stock' | head -n1
}

pretty(){
    [[ "$2" == "" ]] && echo -e "\t$1 \033[38;5;208mNone\033[0m"
    [[ "$2" == "out-of-stock" ]] && echo -e "\t$1 \033[31m$2\033[0m"
    [[ "$2" == "in-stock" ]] && echo -e "\t$1 \e[32m$2\033[0m"
}

echo "$s" | while IFS= read -r item; do
    echo "$item"

    pretty "Otokonoko Pharmacy" $(get "otkph.am/product" "$item" | awk -F'&quot;' '{print $11}' | awk '{print $2}' | sed 's/\\//g')
    pretty "AstroVials" $(get "astrovials.com/product" "$item" | awk -F'"' '{print $2}' | awk '{print $2}')
    pretty "HeraHRT" $(get "herahrt.com/shop" "$item" | awk -F'"' '{print $2}' | awk '{print $2}')
    pretty "CalyxLabs" $(get "calyxlabs.cc/product" "$item" | awk -F'"' '{print $2}' | awk '{print $2}')
done