Skip to content

Commit

Permalink
Merge pull request #29 from weni-ai/feature/links
Browse files Browse the repository at this point in the history
Feature/links
  • Loading branch information
AlisoSouza authored Mar 28, 2024
2 parents ab663ef + 255f922 commit b6069eb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN pip install poetry
COPY pyproject.toml poetry.lock ./

RUN poetry config virtualenvs.create false && \
poetry install --no-dev
poetry install --only main

RUN apt update && apt install libmagic1 -y
RUN poetry add python-magic
Expand Down
2 changes: 1 addition & 1 deletion app/loaders/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def _urls(self, urls: Union[List[str], str]):

def __init__(self, urls: Union[List[str], str]) -> None:
self.urls = self._urls(urls)
self.loader = UnstructuredURLLoader(urls=self.urls)
self.loader = UnstructuredURLLoader(urls=self.urls, headers={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0"})

def load(self) -> List[Document]:
return self.loader.load()
Expand Down
17 changes: 10 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b6069eb

Please sign in to comment.