{"id":25002074,"url":"https://github.com/st1vms/ws-listener","last_synced_at":"2026-04-17T15:32:14.618Z","repository":{"id":275581941,"uuid":"926504735","full_name":"st1vms/ws-listener","owner":"st1vms","description":"Python Websocket listener based off Selenium and Chromedriver","archived":false,"fork":false,"pushed_at":"2025-02-05T11:21:20.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T20:31:00.494Z","etag":null,"topics":["chrome","chromedriver","interceptor","listener","python","reader","selenium","websocket","windows"],"latest_commit_sha":null,"homepage":"","language":"Python","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/st1vms.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,"publiccode":null,"codemeta":null}},"created_at":"2025-02-03T11:27:02.000Z","updated_at":"2025-02-28T16:13:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"eeb8da1f-22ca-4e47-ad7f-8161d8af7f88","html_url":"https://github.com/st1vms/ws-listener","commit_stats":null,"previous_names":["st1vms/ws-reader"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/st1vms/ws-listener","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st1vms%2Fws-listener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st1vms%2Fws-listener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st1vms%2Fws-listener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st1vms%2Fws-listener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/st1vms","download_url":"https://codeload.github.com/st1vms/ws-listener/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st1vms%2Fws-listener/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31934333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T12:37:54.787Z","status":"ssl_error","status_checked_at":"2026-04-17T12:37:25.095Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["chrome","chromedriver","interceptor","listener","python","reader","selenium","websocket","windows"],"created_at":"2025-02-04T21:23:31.253Z","updated_at":"2026-04-17T15:32:14.612Z","avatar_url":"https://github.com/st1vms.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ws-listener\n\nPython Websocket listener based off Selenium and Chromedriver.\nAble to read inbound and outbound websocket messages in a browser session.\n\n## Requirements\n\n- Windows\n\n- Python \u003e= 3.10\n\n- Latest Chrome version\n\n- Latest stable [chromedriver.exe](https://googlechromelabs.github.io/chrome-for-testing/) inside a PATH folder\n\n- `selenium` package installed\n\n```shell\npip install selenium\n```\n\n## Example Usage\n\n```py\n# Import listener\nfrom ws_listener import WSListener\n\n# Create a listener\nlistener = WSListener(\n    url='https://www.twitch.tv/',\n    chrome_profile='Default', # Default chrome profile\n    headless=True, # Defaults to headless\n    logging=False # Disable message logging\n)\n\n# Run the listener into a daemon thread\ntry:\n    listener.start()\n    # Print first 10 messages and exit\n    for _ in range(10):\n        # Read WebSocketMessage from internal queue\n        print(listener.messages.get())\nfinally:\n    # Remember to close the listener thread\n    listener.close()\n```\n\n## WebSocketMessage type\n\nThe internal `messages` Queue holds all the messages received and sent over the browser session,\nthey are dataclasses of type `WebSocketMessage`.\n\nThese are the properties of a message:\n\n-`payload` (str): The content of the WebSocket message.\n\n-`request_id` (str): A unique identifier for the request associated with the message.\n\n-`timestamp` (float): The time at which the message was received, represented as a Unix timestamp.\n\n-`url` (str): The URL of the WebSocket endpoint from which the message was received or sent to.\n\n-`received` (bool): Flag indicating if the packet was received (True) or sent (False).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fst1vms%2Fws-listener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fst1vms%2Fws-listener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fst1vms%2Fws-listener/lists"}