Skip to content

List index out of range error #1

@JuliavOosten

Description

@JuliavOosten

Hi! Thanks for your code, it is exactly what I was looking for! However, when using it I get the following error:

Please enter the keyword (Dutch[Language])
Please enter the number of results 10000
Traceback (most recent call last):
  File "Scrape_PubMed.py", line 201, in <module>
    article = get_bibliography(soup)
  File "Scrape_PubMed.py", line 62, in get_bibliography
    initial = authorlist.find_all('initials')[i].text
IndexError: list index out of range

How do I fix this? I know there are 20000+ results for that keyword so I don't really see what's off here...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions