Skip to content

Add proxy configuration to help rotate Baidu IPs - #2

Open
Dux1007 wants to merge 1 commit into
masterfrom
codex/develop-web-scraper-for-baidu-data-i81fa3
Open

Add proxy configuration to help rotate Baidu IPs#2
Dux1007 wants to merge 1 commit into
masterfrom
codex/develop-web-scraper-for-baidu-data-i81fa3

Conversation

@Dux1007

@Dux1007 Dux1007 commented Oct 18, 2025

Copy link
Copy Markdown
Owner

Summary

  • allow the Baidu index client to accept default and per-request proxy overrides when fetching data
  • expose proxy configuration through new environment variables and the API/front-end form so users can route traffic via another IP
  • document proxy usage in the README to guide users on switching networks when blocked

Testing

  • python -m compileall app start_app.py

https://chatgpt.com/codex/tasks/task_e_68f31e417a34832f91a6fdef169bb3ff

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/models/fetch.py
from datetime import date
from typing import List, Optional

from pydantic import BaseModel, Field, validator

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P0 Badge Import removed Pydantic validator decorator

The models module still imports and uses validator, but requirements.txt pins FastAPI ≥0.110 which installs Pydantic v2, where the top‑level validator symbol has been removed. Attempting to import this module will raise ImportError: cannot import name 'validator' from 'pydantic', preventing the API from starting. Switch to field_validator or import from pydantic.v1 so the validation code works under the dependencies declared here.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant