Advertisement
iklio

Untitled

Oct 18th, 2013
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.65 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. import urllib2
  4. import re
  5. import sys
  6.  
  7. # url = 'http://www.xrel.to/game-update-release-list.html?archive=2012-01'
  8. url = sys.argv[1]
  9.  
  10. usock = urllib2.urlopen(url)
  11. data = usock.read()
  12. usock.close()
  13. #print data
  14.  
  15. list = data.split('_title')
  16. for index in range(len( list)):
  17.   f = list[index]
  18.   tt = f.split('>')
  19.   ttt = tt[1].split('<')
  20.   rls = ttt[0].strip()
  21.   if '...' not in rls:
  22.     if rls != '' and rls != 'Release-Optionen' and rls != 'Neue Kommentare':
  23.       print rls
  24.   else:
  25.     prev = list[index-1]
  26.     if 'truncd' in prev:
  27.       tt2 = prev.split('truncd')
  28.       print tt2[1][9:].split('"')[0]
  29.     else:
  30.       print rls
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement