Xpath Error: IndexError: list index out of range [How to Solve]

Reason: list cannot be empty, and the content extracted by XPath may be empty, so I need to make a blank judgment
I use len to judge, and then do other processing

Read More: