Created: 2011-07-07 23:00
Updated: 2013-12-28 09:49


This is a scraping script for extracting the results of the Romanian Baccalaureate from It works for the years 2010 and 2011. It can read from standard input or files. The files can be compressed with gzip, bzip2 or xz.

I wrote it to help a friend who wanted to analyze the results the of the exam. You can read her analysis at the following addresses:


./ --help
usage: [-h] [-o OUTPUT] [--format FORMAT] [--dbtable DBTABLE]
               FILE [FILE ...]

Extrage informații despre elevi din fișiere HTML

positional arguments:
  FILE                  O pagină de pe site-ul Folosiți - pentru

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        Fișierul de ieșire. Implicit e stdout.
  --format FORMAT       Formatul de ieșire. Formate suportate: python, pickle,
                        sqlite. Format implicit: python.
  --dbtable DBTABLE     Numele tabelului din baza de date. Nume implicit:

Usage examples

./ data/page_21.html
./ data/page_21.html{,.gz,.bz2,.xz}
./ data/page_18.html data/page_18.html
tar xJfO bac2010_alfabetic_page.tar.xz | ./ --format sqlite --output bac.sqlite --dbtable results2010 -

Installation and Requirements

Fedora 15

yum install python-lxml pyliblzma

Copyright and License

The code is too simple and too ugly to require legal paperwork, so I declare it public domain. Though if you find this useful in any way, I would like you to tell me about it or give me some credit. Thank you!


This wouldn't have been possible without the Sothink SWF Decompiler. Shame on Siveco for using Flash even if it wasn't really needed.

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more