thanks for the suggestion.
Upon code inspection I note 2 things:
1)
the current example code on arXiv does in fact not display the "First
Author", but instead it displays the last author. This is with
feedparser 5.0.1
2)
The comments in the code point to a limitation in feedparser 4.1.
# feedparser v4.1 only grabs the first author
author_string = entry.author
This limitation is not present in current versions (5.0.1) of
feedparser (I did not verify that it is in fact present in version
4.1)
so the direct method to display all authors is something along the lines of
print 'Authors: %s' % ', '.join(author.name for author in entry.authors)
without the "workaround" you suggest in your patch
# change author -> contributors (because contributors is a list)
response = response.replace('author','contributor')
this renaming is unnecessary with current feedparser.
So then the question is, should the example be fixed to correctly
display the first author, should it be modified to display all
authors, or should another example be added doing one or the other?
Also, what about affiliation. Your code removes the section that
handles affiliation. Why?
Cheers
T.
> --
> You received this message because you are subscribed to the Google Groups "arXiv api" group.
> To post to this group, send email to arxi...@googlegroups.com.
> To unsubscribe from this group, send email to arxiv-api+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/arxiv-api?hl=en.
>
>
I verified that feedparser.py version 4.1 does indeed not handle
multiple authors.
feedparser.py version 5.0.1 corrects this deficiency, so the direct
way to print all author names is
print 'Authors: %s' % ', '.join(author.name for author in entry.authors)
Cheers
T.