Skip to content

Instantly share code, notes, and snippets.

Created December 25, 2012 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/4373930 to your computer and use it in GitHub Desktop.
Save anonymous/4373930 to your computer and use it in GitHub Desktop.
meh
#!/usr/bin/env python
import string, re
import requests
URL_LIST = 'http://www.bestoldgames.net/abc/%s.php'
URL_DL = 'http://www.bestoldgames.net/download/bgames/%s.zip'
RE_HREF = re.compile(r'<a href="/stare-hry/(.*?).php">')
urls = []
for one in ['123'] + list(string.lowercase):
page = requests.get(URL_LIST % one)
for match in re.finditer(RE_HREF, page.content):
urls.append(URL_DL % match.group(1))
for one in sorted(set(urls)):
print one
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment