-
Notifications
You must be signed in to change notification settings - Fork 2
/
cupones_udemy.sh
3 lines (3 loc) · 1.78 KB
/
cupones_udemy.sh
1
2
3
curl https://smartybro.com/category/udemy-coupon-100-off/ 2> /dev/null | grep "</a></h2>" | sed s/"href="/""/ | sed s/">"// | sed s/"<\/a><\/h2>.*"/""/ | while read A B; do AUX=`curl $A 2> /dev/null | grep "udemy" | grep "couponCode" | sed s/".*href=."/""/ | sed s/"?.*couponCode="/"?couponCode="/ | sed s/"&.*"/""/`; if [ "" != "$AUX" ]; then ID=`curl "$AUX" 2> /dev/null | grep "/cart/added/course/" | tail -n 1 | sed s/".*\/cart\/added\/course\/"/""/ | sed s/"\/.*"/""/`; COUPON=`echo $AUX | sed s/".*couponCode="/""/`; if [ "" != "$ID" ]; then if [ "" != "$COUPON" ]; then AUX2=`curl "https://www.udemy.com/api-2.0/course-landing-components/$ID/me/?couponCode=$COUPON&components=redeem_coupon,discount_expiration" 2> /dev/null`; AUX2=`echo $AUX2 | grep "is_enabled\":true" | grep "details\":null"`; if [ "" != "$AUX2" ]; then echo $B; echo $AUX; echo ""; fi; fi; fi; fi; sleep 2; done;
#viic :)
curl https://udemycoupons.me/ 2> /dev/null | grep "entry-title td-module-title" | sed s/"\" rel=\"bookmark\" title=\""/" "/ | sed s/".*href=\""/""/ | sed s/"\">.*"/""/ | while read A B; do AUX=`curl $A 2> /dev/null | grep "couponCode=" | sed s/".*href=\""/""/ | sed s/"?.*couponCode="/"?couponCode="/ | sed s/"&.*"/""/ | sed s/"\" .*"/""/`; if [ "" != "$AUX" ]; then ID=`curl "$AUX" 2> /dev/null | grep "/cart/added/course/" | tail -n 1 | sed s/".*\/cart\/added\/course\/"/""/ | sed s/"\/.*"/""/`; COUPON=`echo $AUX | sed s/".*couponCode="/""/`; if [ "" != "$ID" ]; then if [ "" != "$COUPON" ]; then AUX2=`curl "https://www.udemy.com/api-2.0/course-landing-components/$ID/me/?couponCode=$COUPON&components=redeem_coupon,discount_expiration" 2> /dev/null`; AUX2=`echo $AUX2 | grep "is_enabled\":true" | grep "details\":null"`; if [ "" != "$AUX2" ]; then echo $B; echo $AUX; echo ""; fi; fi; fi; fi; sleep 2; done;