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.
Feature | Available |
---|---|
getCityList | ✅ |
trackReceipt | ✅ |
checkDropPointByGPS | ✅ |
checkRates by weight | ✅ |
checkDropPointByDistrict | ✅ |
checkDropPointByGPS by ISP | ✅ |
checkRates by height, length, width | ✅ |
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
jnt = JntCrawling(
enable_log
)
Parameter | Type | Description |
---|---|---|
enable_log |
boolean |
Required. False to Disable logging, True to Enable logging |
jnt.getCityList()['data']
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 |
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 |
jnt.trackReceipt(
billCodes="Jxxxxxxxxxx"
)
Parameter | Type | Description |
---|---|---|
billCodes |
string |
Required. receipt of delivery |
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 |
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.
jnt.checkDropPointByGPS()
To run tests, run the following command
cd test
List of test in folder test
python3 test_checkDropPointByDistrict.py