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

soup = BeautifulSoup(urllib2.urlopen('https://security-tracker.debian.org/tracker/data/unknown-packages').read())
cache_file=os.path.join(os.path.dirname(os.path.abspath(__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