{"id":21874352,"url":"https://github.com/daymade/check_avail_bochk","last_synced_at":"2025-03-21T23:18:20.644Z","repository":{"id":228406829,"uuid":"773898035","full_name":"daymade/check_avail_bochk","owner":"daymade","description":"query available appointment slots for BOC HK","archived":false,"fork":false,"pushed_at":"2024-03-18T16:14:14.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-26T17:41:37.208Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daymade.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-03-18T15:36:56.000Z","updated_at":"2024-04-24T17:25:04.000Z","dependencies_parsed_at":"2024-03-18T17:23:34.328Z","dependency_job_id":null,"html_url":"https://github.com/daymade/check_avail_bochk","commit_stats":null,"previous_names":["daymade/check_avail_bochk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daymade%2Fcheck_avail_bochk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daymade%2Fcheck_avail_bochk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daymade%2Fcheck_avail_bochk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daymade%2Fcheck_avail_bochk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daymade","download_url":"https://codeload.github.com/daymade/check_avail_bochk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244880660,"owners_count":20525515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-28T07:12:04.332Z","updated_at":"2025-03-21T23:18:20.618Z","avatar_url":"https://github.com/daymade.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bank Appointment Query Tool\n\nThis tool is designed to query available appointment slots for bank branches directly from the Bank of China (Hong Kong) appointment system. It facilitates finding open time slots across various districts, making it easier for individuals to plan their visits to the bank. This script is to be executed in the Chrome browser's Developer Tools console, specifically within the context of an iframe on the Bank of China's appointment page.\n\n## Prerequisites\n\n- A modern web browser (Chrome recommended).\n- Access to the Bank of China (Hong Kong) appointment system webpage.\n\n## Important Note\n\nDue to CORS (Cross-Origin Resource Sharing) restrictions, this script can only be executed in the console of the inner iframe named `iframe(input.action)` or `iframe(continueInput.action)`, and **not** in the top-level console (`www.bochk.com`). The correct console can be accessed by navigating to the Developer Tools in Chrome, selecting the \"Console\" tab, and ensuring you're targeting the correct iframe context via the dropdown menu at the top of the Console panel.\n\n## How to Use\n\n1. **Navigate to the Appointment Page**: Go to the Bank of China (Hong Kong) appointment system website.\n2. **Open Developer Tools**: Right-click anywhere on the page and select \"Inspect\" or use the shortcut `Ctrl+Shift+I` (Windows/Linux) or `Cmd+Opt+I` (Mac).\n3. **Find the Correct Iframe**: In the Developer Tools, switch to the \"Console\" tab and select the appropriate iframe context as mentioned above.\n4. **Paste and Execute the Script**: Copy the entire content in the [queryDate.js](queryDate.js) and paste it into the console, then press Enter to execute it.\n\n### Making Queries\n\nTo query for available appointment slots, use the `queryDate` function with your desired date as an argument in the `DD/MM/YYYY` format:\n\n```javascript\nqueryDate(\"23/03/2024\");\n```\n\nYou can make multiple queries for different dates in sequence:\n\n```javascript\nqueryDate(\"23/03/2024\");\nqueryDate(\"24/03/2024\");\n```\n\n### Reading the Output\n\nThe script will log progress updates and responses from the server directly to the console. This includes:\n\n- Request details for each district and appointment time being queried.\n- Responses highlighting available appointments for each query.\n- A summary of all available appointments once all queries for the given dates are completed.\n\n## Customization\n\nYou may customize the `districts`, `appTimesWeekdays`, and `appTimesSaturday` arrays within the script to match any updates or specific requirements related to the bank's operating hours and available districts.\n\n## Troubleshooting\n\nIf you encounter issues related to CORS restrictions or incorrect console context, ensure you're running the script in the correct iframe's console within the Bank of China's appointment system webpage.\n\n## Contribution\n\nFeel free to contribute to the development of this tool by suggesting improvements or reporting issues.\n\n## Disclaimer\n\nThis tool is not affiliated with the Bank of China (Hong Kong) or any of its subsidiaries. It is provided as is, for informational purposes only. Please use it responsibly and in accordance with the bank's terms of service.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaymade%2Fcheck_avail_bochk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaymade%2Fcheck_avail_bochk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaymade%2Fcheck_avail_bochk/lists"}