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

Handle long author lists #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

gdubyalee
Copy link

Hi,
I recently found that running

$ paper 2408.13687

caused an AttributeError. This doesn't seem to happen with other papers, but this paper has hundreds of authors...

This error was thrown in src/arxiv_dl/scrapers.py:

    author_list = [i.string.strip() for i in result]
                   ^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'strip'

the variable result was a beautifulsoup query result that ended in

...
<a href="javascript:toggleAuthorList('long-author-list','et al. (149 additional authors not shown)');" id="toggle" title="Show Entire Author List">
    et al. (149 additional authors not shown)</a>
<noscript> You must enable JavaScript to view entire author list.</noscript></div>.

As such I'm submitting a pull request for your consideration that modifies the program's behaviour to emit a warning if authors are unavailable, rather than an AttributeError. There may be much better solutions.

…script) with a warning rather than an AttributeError
@MarkHershey
Copy link
Owner

MarkHershey commented Dec 10, 2024

Thanks for spotting the edge case, I will merge the improvement into my next release.

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

Successfully merging this pull request may close these issues.

3 participants