langchain
                                
                                
                                
                                    langchain copied to clipboard
                            
                            
                            
                        update web_base.py to have verify option
We propose an enhancement to the web-based loader initialize method by introducing a "verify" option. This enhancement addresses the issue of SSL verification errors encountered on certain web pages. By providing users with the option to set the verify parameter to False, we offer greater flexibility and control.
Who can review?
@eyurtsev
And by adding verify option: you can finally pass in headers such as
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'}
to bypass the SSL verification.
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'}
loader = WebBaseLoader(web_path="https://SO_AND_SO.com", header_template=headers, verify=False)
data = loader.load()
This solves a lot of issues that I faced in the recent past.
The older version of web_base.py gives errors:
The newer version of web_base.py is working just fine:
@hwchase17 is attempting to deploy a commit to the LangChain Team on Vercel.
A member of the Team first needs to authorize it.