-
Notifications
You must be signed in to change notification settings - Fork 10
fix: residential actor proxies #185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes residential actor proxy configuration across TikTok and web scraper clients by introducing a typed ApifyProxy struct to replace unstructured proxy configurations.
Key changes:
- Introduced
types.ApifyProxystruct to standardize proxy configuration with residential proxy groups - Simplified TikTok client by removing unnecessary JSON marshaling/unmarshaling steps
- Updated web scraper to use the new typed proxy configuration
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| api/types/apify.go | Introduces new ApifyProxy struct with typed fields for proxy configuration |
| internal/jobs/tiktokapify/client.go | Updates TikTok client to use typed proxy struct and removes redundant marshaling logic |
| internal/jobs/tiktok_test.go | Removes proxy parameter from test case as it's now handled internally |
| api/types/web.go | Adds Proxy field using ApifyProxy type to web scraper request |
| api/args/web/scraper/scraper.go | Configures default residential proxy settings in web scraper arguments |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Fixes #184 |
rapidfix
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
PR summary (vs main)
High-level changes
ApifyProxywith residential group and wires it into both web scraper and TikTok Apify requests.map[string]anyproxy payloads with a strongly-typed struct and passes typed requests directly to the Apify client (removing JSON marshal/unmarshal round-trips).proxyConfigurationin the JSON payload.File-by-file highlights
api/types/apify.go(new)ApifyProxy { UseApifyProxy bool, ApifyProxyGroups []string }.api/types/web.goWebScraperRequestgainsProxy ApifyProxywith JSONproxyConfiguration.api/args/web/scraper/scraper.goToScraperRequest()setsProxytoUseApifyProxy: truewithApifyProxyGroups: ["RESIDENTIAL"].internal/jobs/tiktokapify/client.goTikTokSearchByQueryRequest.Proxybecomestypes.ApifyProxy.map[string]any; callsRunActorAndGetResponsewith the typed request for both search and trending flows.internal/jobs/tiktok_test.go"proxy": {"use_apify_proxy": true}map shape.Impact/Risks
map[string]anyfor proxy/request inputs must usetypes.ApifyProxy.proxyConfigurationwithuseApifyProxy/apifyProxyGroups(camelCase), replacing any prior snake_case usage. Ensure external actor inputs match this schema.