Skip to content

A CLI tool to get (scrape) information about parcel's tracking from https://tracking.post.ir

License

Notifications You must be signed in to change notification settings

AmirAref/post-tracker

Repository files navigation

PyPI - Version PyPI - Python Version Downloads

Issues Stargazers MIT License


Post Tracker

A command-line tool to get information about parcel's tracking from https://tracking.post.ir

Report Bug · Request Feature


Screenshot

Install the program :

install the post-tracker using pip :

pip install post-tracker

Using as a library

To use the post_tracker as a library in your projects, do as following :

import asyncio
from post_tracker import PostTracker
from post_tracker.errors import TrackingNotFoundError

async def main():
    code = "12345" # tracking code
    async with PostTracker() as tracker_app:
        try:
            # get tracking data
            result = await tracker_app.get_tracking_post(tracking_code=code)
            print(result)
        except TrackingNotFoundError as e:
            # tracking data not found
            return print(e)


asyncio.run(main())

Using as a CLI tool

After install, just write post-tracker command to access to program :

# get help
post-tracker -h
# or, pass your tracking code
post-tracker -c 123456789101111213

Telegram Bot:

there is also a telegram robot developed based on this library to get parcel's tracking information in telegram:

Repository . Robot


Contributing

Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

Here is the Contributing Guidelines. Don't forget to give the project a star! Thanks again!


License

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


TODO:

  • create models to better parsing the data.
  • create dmenu (or fzf menu) to save tracking codes in local cache and select in future program's runs.
  • add installer script as a CLI tool in linux machines.
  • create python telegram bot.
  • make output result prettiy.
  • make and test compatibily with windows os
  • publish on pypi.org
  • write README.md in persian
  • re-write cli using click library
  • write tests
  • add CI/CD

About

A CLI tool to get (scrape) information about parcel's tracking from https://tracking.post.ir

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages