community[patch]: Redundant Parser checker for Webbaseloader (#30632)

- **Description:** We do not need to set parser in `scrape` since it is
already been done in `_scrape`
- **Issue:** #30629, not directly related but makes sure xml parser is
used
This commit is contained in:
Mohammad Mohtashim 2025-04-04 23:11:26 +05:00 committed by GitHub
parent 150ac0cb79
commit bff56c5fa6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -367,9 +367,6 @@ class WebBaseLoader(BaseLoader):
def scrape(self, parser: Union[str, None] = None) -> Any:
"""Scrape data from webpage and return it in BeautifulSoup format."""
if parser is None:
parser = self.default_parser
return self._scrape(self.web_path, parser=parser, bs_kwargs=self.bs_kwargs)
def lazy_load(self) -> Iterator[Document]: