Last active
June 29, 2023 16:57
-
-
Save selftaught/2d0a5942c798660b6125601e0901fe67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rm -rf plugins | |
mkdir plugins | |
for i in $(seq 1 2); do | |
curl -s "https://wordpress.org/plugins/browse/popular/page/$i/" | \ | |
grep --color "https://wordpress.org/plugins/" | \ | |
grep "<h3 class=\"entry-title\">" | sed "s/.*a href=\"//g" | sed "s/\" rel.*//g" | \ | |
xargs -I{} curl -s {} | grep downloadUrl | grep -Eo "https:[^\"]+" | \ | |
xargs -I{} wget -P plugins {} | |
done | |
cd plugins && ls -1 | sed 's/.zip//g' | xargs -I{} /bin/bash -c 'mkdir {} ; unzip "{}.zip" -d {}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment