langchain/docs
sByteman 31e7664afd
community[minor]: add proxy support to RecursiveUrlLoader (#27364)
**Description**
This PR introduces the proxies parameter to the RecursiveUrlLoader
class, allowing the user to specify proxy servers for requests. This
update enables crawling through proxy servers, providing enhanced
flexibility for network configurations.
The key changes include:
  1.Added an optional proxies parameter to the constructor (__init__).
2.Updated the documentation to explain the proxies parameter usage with
an example.
3.Modified the _get_child_links_recursive method to pass the proxies
parameter to the requests.get function.



**Sample Usage**

```python
from bs4 import BeautifulSoup as Soup
from langchain_community.document_loaders.recursive_url_loader import RecursiveUrlLoader

proxies = {
    "http": "http://localhost:1080",
    "https": "http://localhost:1080",
}
url = "https://python.langchain.com/docs/concepts/#langchain-expression-language-lcel"
loader = RecursiveUrlLoader(
    url=url, max_depth=1, extractor=lambda x: Soup(x, "html.parser").text,proxies=proxies
)
docs = loader.load()
```

---------

Co-authored-by: root <root@thb>
2024-10-16 16:29:59 +00:00
..
api_reference experimental: migrate to external repo (#26879) 2024-09-25 19:02:19 -07:00
cassettes docs: Upgrade examples with RunnableWithMessageHistory to langgraph memory (#26855) 2024-09-27 20:04:30 +00:00
data docs: 👥 Update LangChain people data (#27022) 2024-10-08 17:09:07 +00:00
docs community[minor]: add proxy support to RecursiveUrlLoader (#27364) 2024-10-16 16:29:59 +00:00
scripts docs[patch]: update links w/ new langgraph API ref (#26961) 2024-10-03 23:52:01 +00:00
src docs: add discussions with giscus (#27172) 2024-10-11 15:14:45 -07:00
static docs: Upgrade examples with RunnableWithMessageHistory to langgraph memory (#26855) 2024-09-27 20:04:30 +00:00
.gitignore infra: cleanup docs build (#21134) 2024-05-01 17:34:05 -07:00
.yarnrc.yml docs[minor]: Add thumbs up/down to all docs pages (#18526) 2024-03-04 15:14:28 -08:00
babel.config.js Restructure docs (#11620) 2023-10-10 12:55:19 -07:00
docusaurus.config.js docs: upgrade to docusaurus v3 (#26803) 2024-09-24 11:28:13 -07:00
ignore-step.sh multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
Makefile docs: build new api docs (#26951) 2024-10-01 09:18:54 -07:00
package.json docs: add discussions with giscus (#27172) 2024-10-11 15:14:45 -07:00
README.md docs: developer docs (#14776) 2023-12-17 12:55:49 -08:00
sidebars.js docs: Upgrade examples with RunnableWithMessageHistory to langgraph memory (#26855) 2024-09-27 20:04:30 +00:00
vercel_requirements.txt docs: add api referencs to langgraph (#26877) 2024-09-26 15:21:10 -04:00
vercel.json docs: v0.3 link redirect (#26632) 2024-09-18 14:28:56 -07:00
yarn.lock docs: add discussions with giscus (#27172) 2024-10-11 15:14:45 -07:00

LangChain Documentation

For more information on contributing to our documentation, see the Documentation Contributing Guide