项目作者: wmemorgan

项目描述 :
API which extracts airline seat information from an online travel agency's (OTA) legacy booking system.
高级语言: Python
项目地址: git://github.com/wmemorgan/xml-seat-data-parser.git
创建时间: 2020-08-27T00:41:00Z
项目社区:https://github.com/wmemorgan/xml-seat-data-parser

开源协议:MIT License

下载


Airline Seat Data Parser

API which extracts airline seat information from an
online travel agency’s (OTA) legacy booking system.

Development Environment

Language

  • Python 3.8.1

Libraries

  • xml.etree.ElementTree
  • json

Installation

Clone this repo to your local machine:

  1. git clone https://github.com/wmemorgan/xml-seat-data-parser.git

Usage

Go to the src directory in your local repository and run the script

  1. python main.py

Output

Script creates a file in the output directory named seatinfo.json.

Data Dictionary

The JSON file contains the following data fields:
| Field | Type | Description |
| —- | —- | —- |
| class | string | Cabin class
| isavailable | boolean | Seat availability for purchase
| isbathroom | boolean | Seat is next to the bathrom
| ispreferred | boolean | Seat flagged as Preferred status
| location | string | Seat location
| planesection | string | Location of seat on the plane
| price | integer | Ticket price (USD) of available seat. NOTE: Reports a ‘0’ price if seat is unavailable.
| rowtype | string | Location of row on the plane (i.e. exit row, bulkhead, standard row)
| seatnumber | string | Seat number

License

MIT