Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
for package_name in {a..z}
do
for page in {1..25}
do
curl -s "https://pypi.org/search/?q=${package_name}&page=${page}" \
| grep -o -E 'href="/project/.*' | cut -d '>' -f1 | cut -d '"' -f2 \
| sed -r 's|(.*)|https://pypi.org/\1#files|' \
| while read curr_line
do
curl -s "${curr_line}" | grep 'files.pythonhosted.org/packages' | cut -d '"' -f2
done
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment