Journal Angron's Journal: artgrab.py
import pullparser, sys
import urllib
def parse_scg_article(num):
article_url = urllib("http://www.starcitygames.com/php/news/expandnews.php?"
"article="+num)
p = pullparser.PullParser(article_url)
def parse_scg_main():
p = pullparser.PullParser(scg_url)
for img in p.tags("img"):
if(dict(img.attrs).get("alt", "-") == "Strategy"):
break
for token in p.tags(a):
url = dict(token.attrs).get("href", "-")
num = token_url[-4:]
#if token matches criteria
parse_scg_article(num)