This code builds a large CSV dataset of science fiction and fantasy book metadata by scraping the Internet Speculative Fiction Database.
The metadata consists of book title, author, publication date, and type. Type can be novel, short story, anthology, omnibus, etc.
After the code has finished running, there'll be over 120,000 rows in the generated dataset.
Running time is several hours on a basic Linux server.
The completed dataset is available on Kaggle: