Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tools2/stats_parser.py
blob: 75a52fa34edf9ef1e5f8580bbcda51c4296920bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from BeautifulSoup import BeautifulSoup
import codecs

soup = BeautifulSoup(open('./top.html'))

output = codecs.open('top.txt', encoding='utf-8', mode='w')

for link in soup('a'):
    output.write(link.text.replace(' ','_') + '\n')

output.close()