summaryrefslogtreecommitdiffstats
path: root/check-external/unknown-packages-pts.py
blob: 7346d8f4c64dd36e2469fe5a77377afcb9c51d74 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/python
from BeautifulSoup import BeautifulSoup 
import urllib2
import json
import SOAPpy

soup = BeautifulSoup(urllib2.urlopen('https://security-tracker.debian.org/tracker/data/unknown-packages').read())
cache_file='known-unknown-packages.cache'

pkgs=[ r('td')[0].string for r in soup('table')[0].findAll('tr')[1:] ]

ws = SOAPpy.SOAPProxy('https://packages.qa.debian.org/cgi-bin/soap-alpha.cgi')

for pkg in pkgs:
  if not pkg in open(cache_file).read():
    try: 
       ws.versions(source=pkg)
    except SOAPpy.faultType:
       print pkg
    else:
       with open(cache_file, 'a') as file:
         file.write(pkg+"\n")

© 2014-2024 Faster IT GmbH | imprint | privacy policy