Delivery tracking library on Node.js.
Node.js >= 7.6
NOTE: Sometimes Delibee use Headless Chrome. (e.g. CJλνν΅μ΄)
sudo apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
sudo yum install pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 libXrandr.x86_64 GConf2.x86_64 alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 ipa-gothic-fonts xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc -y
Feel free to submit issues and enhancement requests.
npm install delibee
const express = require('express')
const delibee = require('delibee')({
timeout: 10000, // default timeout value is '10000'
locale: 'en' // default locale is 'ko'
})
const app = express()
app.get('/tracking/companies', async (req, res) => {
const companies = await delibee.company()
res.send(companies)
})
app.get('/tracking', async (req, res) => {
const company = req.query.company
const invoiceNo = req.query.invoice_no
const invoice = await delibee.tracking(company, invoiceNo)
res.send(invoice)
})
app.listen(3000)
http://127.0.0.1:3000/tracking?company={delivery_company_code}&invoice_no={invoice_number}
Company Name | Comapny Code |
---|---|
μ°μ²΄κ΅νλ°° | EPOST |
CJλνν΅μ΄ | CJ |
νμ§νλ°° | HANJIN |
λ‘―λ°νλ°° (ꡬ. νλνλ°°) | LOTTE |
λ‘μ νλ°° | LOGEN |
λλ¦Όνλ°° (ꡬ. KGλ‘μ§μ€) | DREAM |
CVSnet νΈμμ νλ°° | CVSNET |
CU νΈμμ νλ°° | CU |
Key | Description |
---|---|
deliveryCompany | νλ°°νμ¬μ 보 |
invoiceNumber | μ‘μ₯λ²νΈ |
senderName | 보λΈμ΄ |
senderAddr | μΆλ°μ§/μ£Όμ |
receiverName | λ°λμ΄ |
receiverAddr | λμ°©μ§/μ£Όμ |
statusCode | λ°°μ‘μνμ½λ |
statusText | λ°°μ‘μν |
history | λ°°μ‘λ΄μ |
Key | Description |
---|---|
code | νλ°°νμ¬μ½λ |
name | νλ°°νμ¬ |
Key | Description |
---|---|
dateTime | μκ° (timestamp) |
dateString | μκ° (YYYY.MM.DD HH:mm) |
location | μμΉ |
tel | μ νλ²νΈ |
remark | νλ°°μ¬ μ 곡 λ°°μ‘μν |
statusCode | λ°°μ‘μνμ½λ |
statusText | λ°°μ‘μν |
StatusCode | StatusText |
---|---|
-1 | μμμμ |
10 | μ μλκΈ° |
11 | μλ₯ |
20 | μ μ |
30 | μ§ν |
40 | λ°°μ‘μ€(μΆκ³ ) |
50 | λ°°μ‘μ€(μ κ³ ) |
55 | μ€λμ°© |
60 | λ°°λ¬μ€λΉμ€ |
65 | λ°°λ¬μ€ |
70 | λ°°λ¬μλ£ |
71 | λ―Έλ°°λ¬ |
80 | μΈμνμΈ |
{
"success": true,
"invoice": {
"deliveryCompany": {
"code": "CJ",
"name": "CJλνν΅μ΄"
},
"invoiceNumber": "612566673760",
"senderName": "ν
*",
"senderAddr": "",
"receiverName": "μ΄*",
"receiverAddr": "",
"history": [
{
"dateTime": 1512043020000,
"dateString": "2017.11.30 20:57",
"location": "μΈμ²κ°μ’μ¬κ³‘",
"tel": "",
"remark": "보λ΄μλ κ³ κ°λμΌλ‘λΆν° μνμ μΈμλ°μμ΅λλ€",
"statusCode": 20,
"statusText": "μ μ"
},
{
"dateTime": 1512055800000,
"dateString": "2017.12.01 00:30",
"location": "λΆν",
"tel": "",
"remark": "λ¬Όλ₯ν°λ―Έλλ‘ μνμ΄ μ΄λμ€μ
λλ€.",
"statusCode": 40,
"statusText": "λ°°μ‘μ€(μΆκ³ )"
},
{
"dateTime": 1512124740000,
"dateString": "2017.12.01 19:39",
"location": "λμ HUB",
"tel": "",
"remark": "λ°°μ‘μ§μμΌλ‘ μνμ΄ μ΄λμ€μ
λλ€.",
"statusCode": 40,
"statusText": "λ°°μ‘μ€(μΆκ³ )"
},
{
"dateTime": 1512168420000,
"dateString": "2017.12.02 07:47",
"location": "λμ§",
"tel": "",
"remark": "κ³ κ°λμ μνμ΄ λ°°μ‘μ§μ λμ°©νμμ΅λλ€.(λ°°μ‘μμ :--)",
"statusCode": 50,
"statusText": "λ°°μ‘μ€(μ
κ³ )"
},
{
"dateTime": 1512178800000,
"dateString": "2017.12.02 10:40",
"location": "μ λΆμ μ£Όμ‘μ²",
"tel": "",
"remark": "κ³ κ°λμ μνμ λ°°μ‘ν μμ μ
λλ€.(11βΌ13μ)(λ°°μ‘λ΄λΉ:--)",
"statusCode": 65,
"statusText": "λ°°λ¬μ€"
},
{
"dateTime": 1512180420000,
"dateString": "2017.12.02 11:07",
"location": "μ λΆμ μ£Όμ‘μ²",
"tel": "",
"remark": "κ³ κ°λμ μνμ΄ λ°°μ‘μλ£ λμμ΅λλ€.(λ΄λΉμ¬μ:--)",
"statusCode": 70,
"statusText": "λ°°λ¬μλ£"
}
],
"statusCode": 70,
"statusText": "λ°°λ¬μλ£"
}
}
Bug reports and pull requests are welcome on GitHub at https://github.com/moodselah/delibee
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull request so that we can review your changes
NOTE: Be sure to merge the latest from "upstream" before making a pull request!
Company Name | Contributor |
---|---|
μ°μ²΄κ΅νλ°° | @moodselah |
CJλνν΅μ΄ | @moodselah |
νμ§νλ°° | @moodselah |
λ‘―λ°νλ°° (ꡬ. νλνλ°°) | @moodselah |
λ‘μ νλ°° | @moodselah |
λλ¦Όνλ°° (ꡬ. KGλ‘μ§μ€) | @moodselah |
CVSnet νΈμμ νλ°° | @moodselah |
CU νΈμμ νλ°° | @moodselah |