fix HLTB integration#9
Open
innateessence wants to merge 6 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the backend HowLongToBeat (HLTB) integration to use the newer /api/bleed auth/search flow and adds a runnable end-to-end verification script intended to detect when the integration breaks.
Changes:
- Switched HLTB initialization and search requests from the old finder endpoint to
/api/bleed/init+/api/bleed, including dynamic auth fields. - Added response decompression handling for gzip responses.
- Added a networked end-to-end HLTB verification script under
tests/to validate real-world behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| tests/test_hltb_service.py | Adds an end-to-end network verification script for the HLTB integration. |
| py_modules/hltb_service.py | Updates the HLTB request/auth flow to the /api/bleed endpoints and adjusts headers/payload/response handling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+6
to
+7
|
|
||
| import asyncio |
Comment on lines
+22
to
+24
| # Inject the mock decky module into sys.modules before importing hltb_service | ||
| import sys | ||
| sys.modules['decky'] = mock_decky |
Comment on lines
+33
to
+35
| # Cookie from get-auth example (contains session tokens) | ||
| self.base_cookie = "OptanonConsent=isGpcEnabled=1&datestamp=Sat+Jul+04+2026+15%3A29%3A08+GMT-0700+(Pacific+Daylight+Time)&version=202604.2.0&consentId=0811192f-59da-4c3c-aef1-8e5208f252f8&GPPCookiesCount=1&groups=C0001%3A1%2CC0002%3A1%2COSSTA_BG%3A0%2CC0004%3A0&crTime=1783204148972&genVendors=&landingPath=NotLandingPage; OTGPPConsent=DBABLA~BVQVAAAAAACA.YA; usprivacy=1YYY; opt_out=1; zd_core_lialready=true; OptanonAlertBoxClosed=2026-07-04T22:29:08.641Z" | ||
|
|
Comment on lines
141
to
143
| "Prefer": "safe", | ||
| "Accept-Encoding": "gzip, deflate", | ||
| "Referer": f"{self.base_url}/", |
Comment on lines
+73
to
+75
| if auth_token and hp_key and hp_val: | ||
| logger.info(f"Got fresh HLTB auth data (key: {hp_key})") | ||
| return { |
Author
|
vibe coded this with qwen-coder-latest, didn't realize it had a hard-coded cookie, WIP |
Author
|
I think I'm done with this PR unless you want me to refactor/refine by hand or you feel something is missing I'd love if it you would merge it and push a new release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.