Skip to content

Refactor Python proxy examples to use libraries directly#21

Merged
proxymesh merged 15 commits into
mainfrom
feature/python-direct-proxy-examples
Apr 6, 2026
Merged

Refactor Python proxy examples to use libraries directly#21
proxymesh merged 15 commits into
mainfrom
feature/python-direct-proxy-examples

Conversation

@proxymeshai
Copy link
Copy Markdown
Collaborator

@proxymeshai proxymeshai commented Apr 5, 2026

Replace python-proxy-headers and scrapy-proxy-headers-based scripts with plain per-library examples (requests, urllib3, aiohttp, httpx, pycurl, cloudscraper, autoscraper, Scrapy), aligned with the Ruby, JavaScript, and PHP examples. Add python/requirements.txt, update run_tests.py (Scrapy via runspider; skip pycurl or scrapy when imports fail), and refresh the README Python section.

Cursor added 10 commits April 5, 2026 14:42
Remove python-proxy-headers and scrapy-proxy-headers usage. Add per-library
*-proxy.py scripts matching the Ruby/JS/PHP style, plus python/requirements.txt.
Update run_tests.py to match (including Scrapy via runspider and optional skips
when pycurl or scrapy imports fail). Refresh README Python section.

Made-with: Cursor
Strip userinfo from proxy URL and send Proxy-Authorization via proxy_headers
so HTTPS CONNECT matches authenticated requests behavior. Pin integration
workflow Python to 3.12 for stable wheels.

Made-with: Cursor
Pins actions/checkout v6.0.2, setup-python v6.2.0, setup-node v6.3.0 to clear
GitHub Actions Node 20 deprecation warnings on integration workflows.

Made-with: Cursor
Default to example.com HTML with WANTED_TEXT; document JSON is a poor fit.

Made-with: Cursor
Cursor added 5 commits April 6, 2026 14:06
…ilar

Derive wanted text from normalize(unescape(html)) like _get_soup. Pass html= to
get_result_similar so the second HTTP response cannot differ from the first.

Made-with: Cursor
AutoScraper's own tests use build(html=...) with no network; document README
proxy pattern for live URLs. Removes flaky httpbin/proxy HTML drift.

Made-with: Cursor
beautifulsoup4 4.13+ breaks autoscraper build() (empty matches); CI used 4.14.x.

Made-with: Cursor
@proxymesh proxymesh merged commit d30954a into main Apr 6, 2026
3 of 4 checks passed
@proxymesh proxymesh deleted the feature/python-direct-proxy-examples branch April 6, 2026 14:38
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.

2 participants