{"id":16396834,"url":"https://github.com/tri613/nespresso","last_synced_at":"2026-06-15T02:32:03.017Z","repository":{"id":88375018,"uuid":"80925156","full_name":"tri613/nespresso","owner":"tri613","description":"A mobile version for nespresso coffee website :coffee:","archived":false,"fork":false,"pushed_at":"2018-01-31T06:21:33.000Z","size":7690,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T06:15:00.641Z","etag":null,"topics":["crawler","nespresso","node-js"],"latest_commit_sha":null,"homepage":"https://tri613.github.io/nespresso","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tri613.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-04T14:38:42.000Z","updated_at":"2024-05-12T13:11:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"142f1a62-4026-4443-b1c6-673cbecff77b","html_url":"https://github.com/tri613/nespresso","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tri613/nespresso","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tri613%2Fnespresso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tri613%2Fnespresso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tri613%2Fnespresso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tri613%2Fnespresso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tri613","download_url":"https://codeload.github.com/tri613/nespresso/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tri613%2Fnespresso/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34345576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crawler","nespresso","node-js"],"created_at":"2024-10-11T05:08:36.310Z","updated_at":"2026-06-15T02:32:03.001Z","avatar_url":"https://github.com/tri613.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nespresso\n\n:coffee: Nespresso膠囊口味手機版\n\n## v2.0\n\n用Vue.js重新寫了一版！並新增了直接掃描膠囊的功能！  \n（雖然顏色的辨識不太準（爆\n\n原本用 [tracking.js](https://trackingjs.com/) 下去寫，  \n但後來發現效能不太好，再加上發現手機根本就無法用HTML5的webcam（QQ），  \n又換成 [node-vibrant](https://github.com/akfish/node-vibrant) 下去算顏色...\n\n總之開發過程囧囧的，然後上線後實際用也囧囧的，一整個就是個囧囧的小玩具。（寫完還不想整理程式碼（。\n\n後續還想要把它變成pwa，到時候再說吧（。\n\n## v1.0\n\n官方沒有手機版的膠囊口味，想說順便練習寫爬蟲來寫個手機版好了，不然要查很不方便。\n\n因為我家通常的情境都是放一堆在架上然後隨便選一顆來煮，  \n所以希望是能用顏色快速尋找這顆對應的口味。  \n（但後來有點懶著寫所以就直接用input欄位ＸＤ）\n\n尋找膠囊口味的主色是靠node的 `jimp` 和 `get-rgba-palette`來實現，  \n但困難點是不知道基本色區（？）到底該怎麼定義好，  \n所以最後算出來的顏色都有會和理想中有點差異ＸＤ  \n最後乾脆直接人工定義（爆）  \n（程式算出來的顏色是 `crawler/data.json`的版本，人工版本則是`dist/data.json`）\n\n雖然這樣以後要更新就比較麻煩，不過爬蟲也是要我人工手動執行啦⋯⋯\n\n## 爬蟲\n\n\u003e 爬蟲現在已經不可用啦，因為原本官方網站也改版了，還改成用vue寫(XD)，爬這種太困難了所以也作罷。（反正舊的繼續用...）\n\n爬蟲除了解析 HTML tag，這次主要是嘗試使用es7裡面的`async / await`來處理Promise物件，  \n雖然用起來還怪生疏的，不過的確是能感受到他的好處。\n(不用一直`then`覺得很開心)\n\n### 執行爬蟲\n```console\nnode crawler/crawler.js\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftri613%2Fnespresso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftri613%2Fnespresso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftri613%2Fnespresso/lists"}