Box icons created by Good Ware - Flaticon
English 繁體中文
parcel_tw is a Python package for tracking the status of packages in Taiwan. It supports many logistics systems (7-11, FamilyMart, OK, and Shopee).
- Python 3.10+
- tesseract-ocr
Since the E-tracking system of 7-11 cannot bypass the Captcha detection, OCR is needed to parse the verification code.
sudo apt install tesseract-ocr
git clone https://github.com/ryanycs/parcel-tw.git
cd parcel-tw
pip install .
from parcel_tw import track, Platform
order_id = "order_id here"
track(Platform.SevenEleven, order_id) # track 7-11 package
track(Platform.FamilyMart, order_id) # track FamilyMart package
track(Platform.OKMart, order_id) # track OK Mart package
track(Platform.Shopee, order_id) # track Shopee package
track()
will return a TrackingInfo
object, which contains the status of the package.
result = track(Platform.SevenEleven, order_id)
print(result.order_id) # order id
print(result.platform) # logistics platform
print(result.status) # package status
print(result.time) # update time
print(result.is_delivered) # is delivered
print(result.raw_data) # Package details after crawler analysis (dict)
- 7-11
- FamilyMart
- Hi-Life
- OK Mart
- Shopee
- Chunghwa Post
- Upload to PyPI
- asyncio crawler
Distributed under the MIT License. See LICENSE
for more information.