Skip to content

Conversation

@michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Aug 11, 2025

Resolves #17903

Summary by CodeRabbit

  • New Features
    • Added optional Parse and Render settings to Oxylabs scraping actions to enable structured data output or raw rendered HTML.
  • Changes
    • Removed Amazon Reviews, Amazon Questions, and Google Images from available query source options.
  • Chores
    • Bumped Oxylabs component, actions, and source versions to new releases for alignment and compatibility.

@vercel
Copy link

vercel bot commented Aug 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Project Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored Visit Preview Aug 11, 2025 8:36pm
pipedream-docs ⬜️ Ignored Aug 11, 2025 8:36pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored Aug 11, 2025 8:36pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 11, 2025

Walkthrough

Adds parse and render propDefinitions to the Oxylabs app and exposes them in scrape-url and scrape-with-query actions (forwarded in the scrape payload). Removes three decommissioned QUERY_SOURCES entries. Bumps versions for several Oxylabs components and the package.

Changes

Cohort / File(s) Summary
App props & action wiring
components/oxylabs/oxylabs.app.mjs, components/oxylabs/actions/scrape-url/scrape-url.mjs, components/oxylabs/actions/scrape-with-query/scrape-with-query.mjs
Added parse (boolean) and render ("html") propDefinitions to the Oxylabs app; added parse and render public props to both scrape actions and forwarded them in the payload sent to oxylabs.scrape; bumped those actions' versions to 0.0.2.
Decommissioned sources removal
components/oxylabs/common/constants.mjs
Removed amazon_reviews, amazon_questions, and google_images entries from QUERY_SOURCES.
Version bumps (metadata only)
components/oxylabs/actions/create-proxy-session/create-proxy-session.mjs, components/oxylabs/actions/create-schedule/create-schedule.mjs, components/oxylabs/sources/new-scheduled-run-completed/new-scheduled-run-completed.mjs, components/oxylabs/package.json
Incremented action/source metadata versions to 0.0.2 and package version to 0.1.1; no logic changes in those files.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant ScrapeAction as Scrape Action (URL/Query)
  participant OxylabsApp as Oxylabs App
  participant OxylabsAPI as Oxylabs API

  User->>ScrapeAction: Invoke with source/URL, parse?, render?
  ScrapeAction->>OxylabsApp: oxylabs.scrape({ ..., parse, render })
  OxylabsApp->>OxylabsAPI: POST /scrape (payload includes parse, render)
  OxylabsAPI-->>OxylabsApp: Response (structured data or HTML)
  OxylabsApp-->>ScrapeAction: Return response
  ScrapeAction-->>User: Emit API response
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Assessment against linked issues

Objective Addressed Explanation
Add parse (boolean) and render ("html") fields to scrape_with_query action; pass through to API (#17903)
Add parse (boolean) and render ("html") fields to scrape_url action; pass through to API (#17903)
Apply fields for listed sources (Amazon/Google/Bing sets) in respective actions (#17903)
Remove decommissioned sources: amazon_reviews, amazon_questions, google_images (#17903)

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Version bump only (components/oxylabs/actions/create-proxy-session/create-proxy-session.mjs) Metadata version increment only; unrelated to parse/render or sources.
Version bump only (components/oxylabs/actions/create-schedule/create-schedule.mjs) Metadata version increment only; unrelated to parse/render or sources.
Version bump only (components/oxylabs/sources/new-scheduled-run-completed/new-scheduled-run-completed.mjs) Metadata version increment only; unrelated to parse/render or sources.
Package version bump (components/oxylabs/package.json) Package version bumped; general release metadata, not part of specified feature changes.

Poem

I nibble code with eager hop,
Parse and render — options drop.
Old sources pruned, new flags set true,
Scrapers hum, the data’s new.
A rabbit’s cheer for changes due. 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cc46301 and 161da4a.

📒 Files selected for processing (1)
  • components/oxylabs/oxylabs.app.mjs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/oxylabs/oxylabs.app.mjs
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue-17903

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@michelle0927 michelle0927 marked this pull request as ready for review August 11, 2025 20:25
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6989cbc and cc46301.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • components/oxylabs/actions/create-proxy-session/create-proxy-session.mjs (1 hunks)
  • components/oxylabs/actions/create-schedule/create-schedule.mjs (1 hunks)
  • components/oxylabs/actions/scrape-url/scrape-url.mjs (3 hunks)
  • components/oxylabs/actions/scrape-with-query/scrape-with-query.mjs (3 hunks)
  • components/oxylabs/common/constants.mjs (0 hunks)
  • components/oxylabs/oxylabs.app.mjs (1 hunks)
  • components/oxylabs/package.json (1 hunks)
  • components/oxylabs/sources/new-scheduled-run-completed/new-scheduled-run-completed.mjs (1 hunks)
💤 Files with no reviewable changes (1)
  • components/oxylabs/common/constants.mjs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (10)
components/oxylabs/package.json (1)

3-3: Version bump looks good

Package version increment to 0.1.1 is consistent with action/source bumps.

components/oxylabs/actions/create-proxy-session/create-proxy-session.mjs (1)

8-8: Version bump only — OK

No logic changes; safe increment to 0.0.2.

components/oxylabs/actions/create-schedule/create-schedule.mjs (1)

8-8: Version bump only — OK

No functional diffs; 0.0.2 is fine.

components/oxylabs/sources/new-scheduled-run-completed/new-scheduled-run-completed.mjs (1)

9-9: Version bump only — OK

Source version to 0.0.2 with no runtime changes.

components/oxylabs/oxylabs.app.mjs (1)

23-28: New parse prop — LGTM

Optional boolean parse prop aligns with the requirement to toggle structured parsing.

components/oxylabs/actions/scrape-with-query/scrape-with-query.mjs (3)

29-34: Added parse prop — OK

Prop wired via propDefinition and forwarded in payload. Matches requirement.


35-40: No remaining render dependencies; decommissioned sources removed

  • The constants for amazon_reviews, amazon_questions, and google_images are no longer present anywhere under components/oxylabs.
  • The only places referencing parse: this.parse and render: this.render are:
    components/oxylabs/actions/scrape-url/scrape-url.mjs (lines 50–51)
    components/oxylabs/actions/scrape-with-query/scrape-with-query.mjs (lines 49–50)

Once you mark render as optional in oxylabs.app.mjs, these existing prop definitions will work as intended.


49-51: Confirm parse + render compatibility

Forwarding parse and render here matches the Oxylabs Web Scraper API contract—no changes needed:

  • Valid render values are "html", "png", or "" (to disable rendering).
  • You can combine render:"html" with parse:true (the parser runs on the rendered HTML).
  • If you need custom parsing, include parsing_instructions alongside parse:true; note that some sources use a built-in parser when parse:true is set, and only one parser type may run at a time.
  • Remember that rendering incurs extra time and traffic—consider increasing client timeouts where appropriate.

✔️ components/oxylabs/actions/scrape-with-query/scrape-with-query.mjs (lines 49–51)

components/oxylabs/actions/scrape-url/scrape-url.mjs (2)

30-35: Added parse prop — OK

PropDefinition reference and optional behavior are appropriate.


50-51: Payload forwards parse and render — OK

No issues forwarding both options to the API.

Copy link
Collaborator

@GTFalcao GTFalcao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@vunguyenhung vunguyenhung merged commit d15f241 into master Aug 12, 2025
11 checks passed
@vunguyenhung vunguyenhung deleted the issue-17903 branch August 12, 2025 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ACTION] Add "Parse" field and remove decommissioned values from "sources"

4 participants