sandrocods / JNTCrawling-py

Crawling menggunakan Automation program yang dibuat dengan Python3 dan menggunakan Application Programming Interface (API) sebagai jalur komunikasi dalam mendapatkan data, Dibuat untuk keperluan pembelajaran dan riset, tidak ada hal yang berbahaya

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JNTCrawling-py

GitHub top language GitHub repo size GitHub Release Date Tests Passing

Crawling menggunakan Automation program yang dibuat dengan Python3 dan menggunakan Application Programming Interface (API) sebagai jalur komunikasi dalam mendapatkan data, Dibuat untuk keperluan pembelajaran dan riset.

Desain-tanpa-judul-3.png

Demo

replit replit

Build With

Features

Feature Available
getCityList
trackReceipt
checkDropPointByGPS
checkRates by weight
checkDropPointByDistrict
checkDropPointByGPS by ISP
checkRates by height, length, width

Run Locally

Clone the project

  git clone https://github.com/sandrocods/JNTCrawling-py/

Go to the project directory

  cd JNTCrawling-py

Install dependencies

  pip install .\requirements.txt

Go to the Example project directory

  cd example

Run Example

  python3 Example.py

API Reference

Create Instance Objects

  jnt = JntCrawling(
    enable_log
)
Parameter Type Description
enable_log boolean Required. False to Disable logging, True to Enable logging

Get City, Province, Country Area

  jnt.getCityList()['data']

Check Rate Delivery with height, length, width

jnt.checkRates(
        height,
        length,
        width,
        receiverAddress,
        senderAddress
    )
Parameter Type Description
height float Required. height object
length float Required. length object
width float Required. width object
receiverAddress string Required. receiverAddress from getCityList
senderAddress string Required. senderAddressh from getCityList

Check Rate Delivery with weight

jnt.checkRates(
        weight,
        receiverAddress,
        senderAddress
    )
Parameter Type Description
weight float Required. weight object
receiverAddress string Required. receiverAddress from getCityList
senderAddress string Required. senderAddressh from getCityList

Track Delivery with billCodes

jnt.trackReceipt(
        billCodes="Jxxxxxxxxxx"
    )
Parameter Type Description
billCodes string Required. receipt of delivery

Check DropPoint by District

jnt.checkDropPointByDistrict(
            district,
            city,
            province
        )
Parameter Type Description
district string Required. district from getCityList
city string Required. city from getCityList
province string Required. province from getCityList

Check DropPoint by GPS

jnt.checkDropPointByGPS(
        longitude,
        latitude
    )
Parameter Type Description
longitude string Required. longitude from maps
latitude string Required. latitude from maps

Note: Get latitude and longitude from ISP ip address, If location not accurate, fill latitude and longitude manually.

Check DropPoint by GPS ISP

jnt.checkDropPointByGPS()

Running Tests

To run tests, run the following command

  cd test

List of test in folder test

  python3 test_checkDropPointByDistrict.py 

Running All Test Passed

All tests are made with UnitTest and display the results as below

image.png

Check Result

Authors

About

Crawling menggunakan Automation program yang dibuat dengan Python3 dan menggunakan Application Programming Interface (API) sebagai jalur komunikasi dalam mendapatkan data, Dibuat untuk keperluan pembelajaran dan riset, tidak ada hal yang berbahaya


Languages

Language:Python 100.0%