- Python 3.6+
- Packages: requests, colorama (These are listed in the provided requirements.txt file.)
- Install dependencies:
pip install -r requirements.txt
-
Download XML Data:
Run
wbd_connector.pyto download batches of XML data.Example:
python3 wbd_connector.py --client-id YOUR_CLIENT_ID --password YOUR_PASSWORD
Optional parameters:
--base-url: Base URL of the service (default: http://services.azymut.pl/oferta/servlet/)--total-records: Total expected records (default: 164000)--batch-size: Number of records per batch (default: 500)
The XML files will be saved in the "batches" directory.
-
Convert XML to CSV:
Run
xml_to_csv.pyto convert the XML files to CSV.Example:
python3 python xml_to_csv.py
Optional parameters:
--batches-dir: Directory containing XML files (default: batches)--output-dir: Directory to store CSV files (default: csv)
The CSV files will be saved in the "csv" directory.
wbd_connector.pywaits 60 seconds between batches and checks for duplicate downloads.xml_to_csv.pyremoves the "atrybuty" property from book records.- Run the scripts in the order above.