Perhaps modifying https://github.com/ethanwillis/zotero-scihub would be a nice starting/continuation point. Also, if you can write the stuff around fetching an ISBN from Zotero, and getting the right LibGen entry, perhaps someone else can fix the issue of converting the right LibGen entry into the actual link.