Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDFs are not always scraped correctly. #1006

Open
emmano opened this issue Dec 4, 2024 · 0 comments
Open

PDFs are not always scraped correctly. #1006

emmano opened this issue Dec 4, 2024 · 0 comments

Comments

@emmano
Copy link

emmano commented Dec 4, 2024

Describe the bug
PDFs are not always scraped correctly.

To Reproduce
Attempt to fetch content using the SemanticScholar retriever

Expected behavior
PDFs are scraped correctly

Additional context
The issue lies here:
https://github.com/assafelovic/gpt-researcher/blob/0034ad08d364b34306ab9c412afb61f93eccbf11/gpt_researcher/scraper/scraper.py#L84C1-L84C34

It assumes that link have to end with the .pdf extension to be parsed as pdf documents using PyMuPDFScraper. Not all pdf links returned by SemanticScholar end in the .pdf extension. Right now, those PDFs that do not end in the .pdf extension are being scraped as if they were regular web urls using the incorrect scrapper.

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

No branches or pull requests

1 participant