release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Search | Go
Wiki > Main > WikiUsers > ArthurRoberts

UserForm edit
FirstName Arthur
LastName Roberts
OrganisationName
OrganisationURL
Profession
Country New Zealand
State
Address
Location
Telephone
VoIP
InstantMessaging (IM)
Email
HomePage
Comment
Edit personal data
Here's the python script I used to scrape the Auckland Radio wiki page (after I wget 'd it into wiki_stations.html:

http://en.wikipedia.org/wiki/List_of_radio_stations_in_Auckland

#!/usr/bin/env python

import re


def write_fmr(output_file, freq, name):
    output_file.write(
        '{:.0f}:{}\n'.format(
            freq*1000000, name
        )
    )

if __name__ == '__main__':
    with open('wiki_stations.html', 'r') as f:
        with open('AucklandNZ.fmr', 'w') as output:
            for line in f:
                m = re.match(r'<td>([0-9]{2,3}\.[0-9]?)</td>', line)
                if m:
                    freq = float(m.groups()[0])
                    name_line = next(f, '')
                    m = re.match(r'.*>(.*)</a>', name_line)
                    if m:
                        write_fmr(output, freq, m.groups()[0])
I Attachment Action Size Date Who Comment
AucklandNZ.fmrfmr AucklandNZ.fmr manage 0.7 K 24 Mar 2015 - 08:34 ArthurRoberts Auckland Radio Frequencies

r2 - 24 Mar 2015 - 08:46:11 - ArthurRoberts

UserForm edit
FirstName Arthur
LastName Roberts
OrganisationName
OrganisationURL
Profession
Country New Zealand
State
Address
Location
Telephone
VoIP
InstantMessaging (IM)
Email
HomePage
Comment
I Attachment Action Size Date Who Comment
AucklandNZ.fmrfmr AucklandNZ.fmr manage 0.7 K 24 Mar 2015 - 08:34 ArthurRoberts Auckland Radio Frequencies
r2 - 24 Mar 2015 - 08:46:11 - ArthurRoberts


Parents: WikiUsers
Copyright by the contributing authors.