#! /usr/bin/python
# vim: fileencoding=UTF-8:
# © 2009 Yves-Alexis Perez <corsac@debian.org>
# Licensed under the WTFPL (version 2 or later) by Sam Hocevar, see
# http://sam.zoy.org/wtfpl/COPYING for details.

from urllib import urlopen
from BeautifulSoup import BeautifulSoup

print "N:\\"
soup = BeautifulSoup(urlopen("http://ftp-master.debian.org/new.html"))
if not soup: sys.exit(1);
queues = soup.findAll('caption')
found = 0
if not queues:
	print "0:\\"
	print 0
else:
	for queue in queues:
		if queue.find('strong').string == "NEW":
			found = 1
			[trouc,trouc2] = [x.string for x in queue.findAll('em',limit=2)]
		else:
			if not found:
				trouc = "0"
				trouc2 = "0"
	print trouc + ":\\"
	print trouc2
