Advertisement
askcompu

Untitled

Aug 9th, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1.     if re.compile('(?i)((s|se)\d+(, | |,)?(e|ep)\d+)').match(query):
  2.         regex = re.compile('(?i)(s|se)(\d+)(, | |,)?(e|ep)(\d+)')
  3.         numbers = regex.findall(query)
  4.         return str(numbers)
  5.         results = [int(i) for i in numbers[0]]
  6.         snum = str(int(results[0]))
  7.         enum = str(int(results[1]))
  8.         uri = 'http://api.ponycountdown.com/' + snum + '/' + enum
  9.         nl = query
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement