When reading the URI path of eHentai galleries, we split on /
. This results in 4-5 fields, the 1st being empty. Whether or not the path ends with the delimiter determines this.
We currently assume that there will always be 5 fields, making use of list deconstruction like so:
_, route, gallery_id, gallery_token, _ = path
This results in an error if there aren't. ~luma_inhibitor wanted this for readability, favoring it over using list index references. I'd realised this edge case when implemented it, but didn't think we'd run into it since page navigation always produced URIs that had the ending slash in my testing. They were able to hit this edge case somehow, unfortunately.
If there's a way we can preserve readability, but be flexible with reading path fields, that'd be ideal. Otherwise, assigning the list indexes to some named variables without list deconstruction is fine.
The nHentai parser is similarly impacted. I think its chrome browser that strips the trailing
/
from URIs copied from the address bar.
Lily helped with this fix. It will be included with code for #67