Skip to content

A Python package for tracking the status of packages in Taiwan. It supports many logistics systems (7-11, FamilyMart, OK, and Shopee).

License

Notifications You must be signed in to change notification settings

ryanycs/parcel-tw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parcel-tw


Box icons created by Good Ware - Flaticon


English 繁體中文

About

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).

Installation

Requirements

  • 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

Install package manually

git clone https://github.com/ryanycs/parcel-tw.git
cd parcel-tw
pip install .

Usage

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)

Roadmap

  • 7-11
  • FamilyMart
  • Hi-Life
  • OK Mart
  • Shopee
  • Chunghwa Post
  • Upload to PyPI
  • asyncio crawler

License

Distributed under the MIT License. See LICENSE for more information.

About

A Python package for tracking the status of packages in Taiwan. It supports many logistics systems (7-11, FamilyMart, OK, and Shopee).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages