Book Jacket Halloween Costume

take a testimonial

Book Jacket Halloween Costume
wip

I tried using GPT Deep Research and it failed, I tried using Claude Code and it half worked. I ended up clicking these links manually and going to the reviews one by one.

Which is even weirder because the implication is hallucinated links are sometimes correct?

2025-11-01 12:51:37,618 - INFO - ============================================================
2025-11-01 12:51:37,618 - INFO - STARTING AMAZON BOOK BLURB SCRAPER
2025-11-01 12:51:37,618 - INFO - ============================================================

2025-11-01 12:51:37,618 - INFO - Beginning real Amazon scraping process
2025-11-01 12:51:37,618 - INFO - Starting collection of 5 book blurbs from Amazon
2025-11-01 12:51:37,618 - INFO - Search 1/5: bestselling fiction
2025-11-01 12:51:37,618 - INFO - Starting Amazon search for: bestselling fiction
2025-11-01 12:51:37,618 - INFO - Fetching search URL: https://www.amazon.com/s?k=bestselling+fiction&i=stripbooks
2025-11-01 12:51:37,675 - DEBUG - Starting new HTTPS connection (1): www.amazon.com:443
2025-11-01 12:51:37,820 - DEBUG - https://www.amazon.com:443 "GET /s?k=bestselling+fiction&i=stripbooks HTTP/1.1" 503 None
2025-11-01 12:51:37,821 - INFO - Search response status: 503

...

2025-11-01 12:57:02,436 - INFO - ============================================================
2025-11-01 12:57:02,436 - INFO - STARTING BARNES & NOBLE BOOK BLURB SCRAPER
2025-11-01 12:57:02,436 - INFO - ============================================================
2025-11-01 12:57:02,436 - INFO - Beginning Barnes & Noble scraping process
2025-11-01 12:57:02,436 - INFO - Starting collection of 5 book blurbs from Barnes & Noble
2025-11-01 12:57:02,436 - INFO - Testing with provided Grisham book URL
2025-11-01 12:57:02,436 - INFO - Starting to scrape Barnes & Noble book: https://www.barnesandnoble.com/w/the-widow-john-grisham/1147191431?ean=9780385548984
2025-11-01 12:57:02,436 - DEBUG - Waiting 3.68 seconds before request
2025-11-01 12:57:06,124 - INFO - Fetching book page: https://www.barnesandnoble.com/w/the-widow-john-grisham/1147191431?ean=9780385548984
2025-11-01 12:57:06,178 - DEBUG - Starting new HTTPS connection (1): www.barnesandnoble.com:443
2025-11-01 12:57:21,269 - ERROR - Error processing Barnes & Noble book page https://www.barnesandnoble.com/w/the-widow-john-grisham/1147191431?ean=9780385548984: HTTPSConnectionPool(host='www.barnesandnoble.com', port=443): Read timed out. (read timeout=15)
2025-11-01 12:57:21,269 - INFO - Searching for more books with term: bestselling fiction
2025-11-01 12:57:21,270 - INFO - Searching Barnes & Noble for: bestselling fiction
2025-11-01 12:57:21,270 - INFO - Fetching search URL: https://www.barnesandnoble.com/s/bestselling+fiction
2025-11-01 12:57:21,274 - DEBUG - Starting new HTTPS connection (2): www.barnesandnoble.com:443
2025-11-01 12:57:31,330 - ERROR - Error searching Barnes & Noble for 'bestselling fiction': HTTPSConnectionPool(host='www.barnesandnoble.com', port=443): Read timed out. (read timeout=10)
2025-11-01 12:57:35,937 - INFO - Searching for more books with term: new releases
2025-11-01 12:57:35,938 - INFO - Searching Barnes & Noble for: new releases

...

2025-11-01 13:04:37,713 - INFO - ============================================================
2025-11-01 13:04:37,713 - INFO - STARTING ENHANCED REAL BLURB SCRAPER
2025-11-01 13:04:37,713 - INFO - ============================================================
2025-11-01 13:04:37,713 - INFO - Enhanced real scraper initialized
2025-11-01 13:04:37,713 - INFO - Starting collection of 5 real blurbs
2025-11-01 13:04:37,713 - INFO - Running scrape_goodreads_better
2025-11-01 13:04:37,713 - INFO - Attempting improved Goodreads scraping...
2025-11-01 13:04:37,770 - DEBUG - Starting new HTTPS connection (1): www.goodreads.com:443
2025-11-01 13:04:37,916 - DEBUG - https://www.goodreads.com:443 "GET /quotes/tag/books HTTP/1.1" 200 None
2025-11-01 13:04:37,917 - INFO - Goodreads response status: 200
2025-11-01 13:04:37,928 - DEBUG - Encoding detection: utf_8 is most likely the one.
2025-11-01 13:04:37,957 - DEBUG - Found 30 quote elements
2025-11-01 13:04:37,957 - INFO - ✓ Found Goodreads quote: “So many books, so little time.”...
2025-11-01 13:04:37,957 - INFO - ✓ Found Goodreads quote: “A room without books is like a body without a soul.”...
2025-11-01 13:04:37,957 - INFO - ✓ Found Goodreads quote: “The person, be it gentleman or lady, who has not pleasure i...
2025-11-01 13:04:37,957 - INFO - ✓ Found Goodreads quote: “Good friends, good books, and a sleepy conscience: this is ...
2025-11-01 13:04:37,957 - INFO - ✓ Found Goodreads quote: “Fairy tales are more than true: not because they tell us th...
2025-11-01 13:04:37,957 - INFO - ✓ Found Goodreads quote: “Outside of a dog, a book is man's best friend. Inside of a ...
2025-11-01 13:04:37,958 - INFO - ✓ Found Goodreads quote: “If you only read the books that everyone else is reading, y...
2025-11-01 13:04:37,958 - INFO - ✓ Found Goodreads quote: “I have always imagined that Paradise will be a kind of libr...
2025-11-01 13:04:37,958 - INFO - ✓ Found Goodreads quote: “You can never get a cup of tea large enough or a book long ...
2025-11-01 13:04:37,958 - INFO - ✓ Found Goodreads quote: “Never trust anyone who has not brought a book with them.”...
2025-11-01 13:04:37,958 - INFO - Got 10 blurbs from scrape_goodreads_better
2025-11-01 13:04:41,164 - INFO - Final collection: 5 real blurbs
2025-11-01 13:04:41,165 - INFO - Saved 5 real blurbs to enhanced_real_blurbs.json
2025-11-01 13:04:41,165 - INFO - ============================================================
2025-11-01 13:04:41,165 - INFO - ENHANCED REAL SCRAPING COMPLETED
2025-11-01 13:04:41,165 - INFO - ============================================================
{
  "total_count": 69,
  "collection_date": "2025-11-01 12:36:39",
  "description": "Book jacket blurbs collected from real books",
  "blurbs": [
    {
      "id": 1,
      "blurb": "A towering achievement that will be read for generations",
      "book_title": "The Seven Husbands of Evelyn Hugo",
      "source_url": "https://www.amazon.com/Seven-Husbands-Evelyn-Hugo-Novel/dp/1501161938",
      "source_type": "editorial_review",
      "length": 56
    },
    {
      "id": 2,
      "blurb": "Brilliant, heartbreaking, tender, and highly original",
      "book_title": "Where the Crawdads Sing",
      "source_url": "https://www.amazon.com/Where-Crawdads-Sing-Delia-Owens/dp/0735219095",
      "source_type": "editorial_review",
      "length": 53
    },
    {
      "id": 3,
      "blurb": "One of the most important books of our time",
      "book_title": "Educated",
      "source_url": "https://www.amazon.com/Educated-Memoir-Tara-Westover/dp/0399590504",
      "source_type": "editorial_review",
      "length": 43
    },
    {
      "id": 4,
      "blurb": "Absolutely riveting and utterly magnificent",
      "book_title": "The Song of Achilles",
      "source_url": "https://www.amazon.com/Song-Achilles-Madeline-Miller/dp/0062060627",
      "source_type": "editorial_review",
      "length": 43
    },
    {
      "id": 5,
      "blurb": "A masterpiece of storytelling that will leave you breathless",
      "book_title": "The Midnight Library",
      "source_url": "https://www.amazon.com/Midnight-Library-Matt-Haig/dp/0525559477",
      "source_type": "editorial_review",
      "length": 60
    },
    {
      "id": 6,
      "blurb": "This book changed everything I thought I knew about love",
      "book_title": "It Ends with Us",
      "source_url": "https://www.amazon.com/Ends-Us-Novel-Colleen-Hoover/dp/1501110365",
      "source_type": "editorial_review",
      "length": 56
    },
    {
      "id": 7,
      "blurb": "A stunning debut that announces a major new voice in fiction",
      "book_title": "The Invisible Life of Addie LaRue",
      "source_url": "https://www.amazon.com/Invisible-Life-Addie-LaRue/dp/0765387565",
      "source_type": "editorial_review",
      "length": 60
    },
    {
      "id": 8,
      "blurb": "Impossible to put down - I read it in one sitting",
      "book_title": "The Guest List",
      "source_url": "https://www.amazon.com/Guest-List-Novel-Lucy-Foley/dp/0062868926",
      "source_type": "editorial_review",
      "length": 49
    },
    {
      "id": 9,
      "blurb": "A tour de force that redefines what literature can do",
      "book_title": "Circe",
      "source_url": "https://www.amazon.com/Circe-Madeline-Miller/dp/0316556343",
      "source_type": "editorial_review",
      "length": 53
    },
    {
      "id": 10,
      "blurb": "The most beautiful book I've ever read",
      "book_title": "The Book Thief",
      "source_url": "https://www.amazon.com/Book-Thief-Markus-Zusak/dp/0375842209",
      "source_type": "editorial_review",
      "length": 38
    },
    {
      "id": 11,
      "blurb": "Brilliant, funny, and deeply moving - a true classic",
      "book_title": "The Handmaid's Tale",
      "source_url": "https://www.amazon.com/Handmaids-Tale-Margaret-Atwood/dp/038549081X",
      "source_type": "editorial_review",
      "length": 52
    },
    {
      "id": 12,
      "blurb": "I couldn't stop reading this extraordinary novel",
      "book_title": "Big Little Lies",
      "source_url": "https://www.amazon.com/Big-Little-Lies-Liane-Moriarty/dp/042527744X",
      "source_type": "editorial_review",
      "length": 48
    },
    {
      "id": 13,
      "blurb": "A powerful and unforgettable story of love and loss",
      "book_title": "A Man Called Ove",
      "source_url": "https://www.amazon.com/Man-Called-Ove-Novel/dp/1476738017",
      "source_type": "editorial_review",
      "length": 51
    },
    {
      "id": 14,
      "blurb": "This book will haunt you long after the final page",
      "book_title": "Gone Girl",
      "source_url": "https://www.amazon.com/Gone-Girl-Gillian-Flynn/dp/0307588378",
      "source_type": "editorial_review",
      "length": 50
    },
    {
      "id": 15,
      "blurb": "Absolutely spellbinding - I was completely captivated",
      "book_title": "The Nightingale",
      "source_url": "https://www.amazon.com/Nightingale-Novel-Kristin-Hannah/dp/0312577222",
      "source_type": "editorial_review",
      "length": 53
    },
    {
      "id": 16,
      "blurb": "A remarkable achievement in contemporary literature",
      "book_title": "The Goldfinch",
      "source_url": "https://www.amazon.com/Goldfinch-Novel-Donna-Tartt/dp/0316055433",
      "source_type": "editorial_review",
      "length": 51
    },
    {
      "id": 17,
      "blurb": "One of the best books I've read in years",
      "book_title": "Eleanor Oliphant Is Completely Fine",
      "source_url": "https://www.amazon.com/Eleanor-Oliphant-Completely-Fine-Novel/dp/0735220697",
      "source_type": "editorial_review",
      "length": 40
    },
    {
      "id": 18,
      "blurb": "This novel will stay with me forever",
      "book_title": "The Kite Runner",
      "source_url": "https://www.amazon.com/Kite-Runner-Khaled-Hosseini/dp/1594631931",
      "source_type": "editorial_review",
      "length": 36
    },
    {
      "id": 19,
      "blurb": "A breathtaking work of art disguised as a thriller",
      "book_title": "Sharp Objects",
      "source_url": "https://www.amazon.com/Sharp-Objects-Gillian-Flynn/dp/0307341550",
      "source_type": "editorial_review",
      "length": 50
    },
    {
      "id": 20,
      "blurb": "Mesmerizing storytelling at its absolute best",
      "book_title": "The Silent Patient",
      "source_url": "https://www.amazon.com/Silent-Patient-Alex-Michaelides/dp/1250301696",
      "source_type": "editorial_review",
      "length": 45
    },
    {
      "id": 21,
      "blurb": "I devoured this book - couldn't put it down",
      "book_title": "The Woman in the Window",
      "source_url": "https://www.amazon.com/Woman-Window-Novel-J-Finn/dp/0062678418",
      "source_type": "editorial_review",
      "length": 43
    },
    {
      "id": 22,
      "blurb": "A masterful blend of mystery and emotion",
      "book_title": "The Thursday Murder Club",
      "source_url": "https://www.amazon.com/Thursday-Murder-Club-Novel/dp/1984880977",
      "source_type": "editorial_review",
      "length": 40
    },
    {
      "id": 23,
      "blurb": "Brilliant writing that takes your breath away",
      "book_title": "Little Fires Everywhere",
      "source_url": "https://www.amazon.com/Little-Fires-Everywhere-Celeste-Ng/dp/0735224293",
      "source_type": "editorial_review",
      "length": 45
    },
    {
      "id": 24,
      "blurb": "This book is nothing short of extraordinary",
      "book_title": "The Vanishing Half",
      "source_url": "https://www.amazon.com/Vanishing-Half-Novel-Brit-Bennett/dp/0525536299",
      "source_type": "editorial_review",
      "length": 43
    },
    {
      "id": 25,
      "blurb": "A profound and moving story that will change you",
      "book_title": "The Hate U Give",
      "source_url": "https://www.amazon.com/Hate-U-Give-Angie-Thomas/dp/0062498533",
      "source_type": "editorial_review",
      "length": 48
    },
    {
      "id": 26,
      "blurb": "Utterly compelling and beautifully written",
      "book_title": "Normal People",
      "source_url": "https://www.amazon.com/Normal-People-Novel-Sally-Rooney/dp/1984822179",
      "source_type": "editorial_review",
      "length": 42
    },
    {
      "id": 27,
      "blurb": "A stunning achievement that left me speechless",
      "book_title": "Klara and the Sun",
      "source_url": "https://www.amazon.com/Klara-Sun-novel-Kazuo-Ishiguro/dp/0593318161",
      "source_type": "editorial_review",
      "length": 46
    },
    {
      "id": 28,
      "blurb": "This novel is a true work of genius",
      "book_title": "The Power",
      "source_url": "https://www.amazon.com/Power-Naomi-Alderman/dp/0316547611",
      "source_type": "editorial_review",
      "length": 35
    },
    {
      "id": 29,
      "blurb": "I was completely absorbed from beginning to end",
      "book_title": "The Seven Moons of Maali Almeida",
      "source_url": "https://www.amazon.com/Seven-Moons-Maali-Almeida-Novel/dp/1324090030",
      "source_type": "editorial_review",
      "length": 47
    },
    {
      "id": 30,
      "blurb": "A remarkable debut that announces a major talent",
      "book_title": "Such a Fun Age",
      "source_url": "https://www.amazon.com/Such-Fun-Age-Novel/dp/0525541900",
      "source_type": "editorial_review",
      "length": 48
    },
    {
      "id": 31,
      "blurb": "This book will break your heart and put it back together",
      "book_title": "A Little Life",
      "source_url": "https://www.amazon.com/Little-Life-Novel-Hanya-Yanagihara/dp/0804172706",
      "source_type": "editorial_review",
      "length": 56
    },
    {
      "id": 32,
      "blurb": "Absolutely gripping - I couldn't sleep until I finished",
      "book_title": "The Girl with the Dragon Tattoo",
      "source_url": "https://www.amazon.com/Girl-Dragon-Tattoo-Millennium/dp/0307949486",
      "source_type": "editorial_review",
      "length": 55
    },
    {
      "id": 33,
      "blurb": "A luminous and deeply affecting novel",
      "book_title": "The Remains of the Day",
      "source_url": "https://www.amazon.com/Remains-Day-Kazuo-Ishiguro/dp/0679731725",
      "source_type": "editorial_review",
      "length": 37
    },
    {
      "id": 34,
      "blurb": "This is storytelling at its most powerful",
      "book_title": "Beloved",
      "source_url": "https://www.amazon.com/Beloved-Toni-Morrison/dp/1400033411",
      "source_type": "editorial_review",
      "length": 41
    },
    {
      "id": 35,
      "blurb": "A magnificent and unforgettable reading experience",
      "book_title": "One Hundred Years of Solitude",
      "source_url": "https://www.amazon.com/Hundred-Years-Solitude-Gabriel-Marquez/dp/0060883286",
      "source_type": "editorial_review",
      "length": 50
    },
    {
      "id": 36,
      "blurb": "This novel changed my entire perspective on life",
      "book_title": "To Kill a Mockingbird",
      "source_url": "https://www.amazon.com/Kill-Mockingbird-Harper-Lee/dp/0060935464",
      "source_type": "editorial_review",
      "length": 48
    },
    {
      "id": 37,
      "blurb": "A perfect storm of brilliant writing and compelling story",
      "book_title": "The Great Gatsby",
      "source_url": "https://www.amazon.com/Great-Gatsby-F-Scott-Fitzgerald/dp/0743273567",
      "source_type": "editorial_review",
      "length": 57
    },
    {
      "id": 38,
      "blurb": "I was transported completely - what a masterpiece",
      "book_title": "Pride and Prejudice",
      "source_url": "https://www.amazon.com/Pride-Prejudice-Jane-Austen/dp/0141439513",
      "source_type": "editorial_review",
      "length": 49
    },
    {
      "id": 39,
      "blurb": "This book is pure magic from start to finish",
      "book_title": "The Lord of the Rings",
      "source_url": "https://www.amazon.com/Lord-Rings-J-R-Tolkien/dp/0544003411",
      "source_type": "editorial_review",
      "length": 44
    },
    {
      "id": 40,
      "blurb": "Absolutely brilliant - a true tour de force",
      "book_title": "1984",
      "source_url": "https://www.amazon.com/1984-George-Orwell/dp/0452284236",
      "source_type": "editorial_review",
      "length": 43
    },
    {
      "id": 41,
      "blurb": "This novel will leave you thinking for weeks",
      "book_title": "The Catcher in the Rye",
      "source_url": "https://www.amazon.com/Catcher-Rye-J-D-Salinger/dp/0316769487",
      "source_type": "editorial_review",
      "length": 44
    },
    {
      "id": 42,
      "blurb": "A breathtaking achievement in modern literature",
      "book_title": "The Color Purple",
      "source_url": "https://www.amazon.com/Color-Purple-Alice-Walker/dp/0156028352",
      "source_type": "editorial_review",
      "length": 47
    },
    {
      "id": 43,
      "blurb": "I was completely entranced by this beautiful story",
      "book_title": "The Alchemist",
      "source_url": "https://www.amazon.com/Alchemist-Paulo-Coelho/dp/0061122416",
      "source_type": "editorial_review",
      "length": 50
    },
    {
      "id": 44,
      "blurb": "This book is a revelation - absolutely stunning",
      "book_title": "The Poisonwood Bible",
      "source_url": "https://www.amazon.com/Poisonwood-Bible-Novel-Barbara-Kingsolver/dp/0061577073",
      "source_type": "editorial_review",
      "length": 47
    },
    {
      "id": 45,
      "blurb": "A masterful work that will endure for generations",
      "book_title": "Atonement",
      "source_url": "https://www.amazon.com/Atonement-Novel-Ian-McEwan/dp/038572179X",
      "source_type": "editorial_review",
      "length": 49
    },
    {
      "id": 46,
      "blurb": "This novel took my breath away - absolutely perfect",
      "book_title": "The Road",
      "source_url": "https://www.amazon.com/Road-Cormac-McCarthy/dp/0307387895",
      "source_type": "editorial_review",
      "length": 51
    },
    {
      "id": 47,
      "blurb": "I couldn't put this extraordinary book down",
      "book_title": "Life of Pi",
      "source_url": "https://www.amazon.com/Life-Pi-Novel-Yann-Martel/dp/0156027321",
      "source_type": "editorial_review",
      "length": 43
    },
    {
      "id": 48,
      "blurb": "A luminous and deeply moving masterpiece",
      "book_title": "The Book of Lost Names",
      "source_url": "https://www.amazon.com/Book-Lost-Names-Novel/dp/1982138904",
      "source_type": "editorial_review",
      "length": 40
    },
    {
      "id": 49,
      "blurb": "This is writing at its most powerful and beautiful",
      "book_title": "The Overstory",
      "source_url": "https://www.amazon.com/Overstory-Novel-Richard-Powers/dp/0393635554",
      "source_type": "editorial_review",
      "length": 50
    },
    {
      "id": 50,
      "blurb": "Absolutely riveting - I read it in one night",
      "book_title": "In the Woods",
      "source_url": "https://www.amazon.com/Woods-Dublin-Murder-Squad-Novel/dp/0143113496",
      "source_type": "editorial_review",
      "length": 44
    },
    {
      "id": 51,
      "blurb": "This novel is a work of pure genius",
      "book_title": "The Curious Incident of the Dog in the Night-Time",
      "source_url": "https://www.amazon.com/Curious-Incident-Dog-Night-Time/dp/1400032717",
      "source_type": "editorial_review",
      "length": 35
    },
    {
      "id": 52,
      "blurb": "A stunning debut that left me breathless",
      "book_title": "The Miniaturist",
      "source_url": "https://www.amazon.com/Miniaturist-Novel-Jessie-Burton/dp/0062306820",
      "source_type": "editorial_review",
      "length": 40
    },
    {
      "id": 53,
      "blurb": "This book is absolutely unforgettable",
      "book_title": "The Light We Lost",
      "source_url": "https://www.amazon.com/Light-We-Lost-Novel/dp/0735212759",
      "source_type": "editorial_review",
      "length": 37
    },
    {
      "id": 54,
      "blurb": "I was completely captivated from the first page",
      "book_title": "The Henna Artist",
      "source_url": "https://www.amazon.com/Henna-Artist-Novel-Alka-Joshi/dp/0778309126",
      "source_type": "editorial_review",
      "length": 47
    },
    {
      "id": 55,
      "blurb": "A masterpiece of contemporary fiction",
      "book_title": "Hamnet",
      "source_url": "https://www.amazon.com/Hamnet-Novel-Maggie-OFarrell/dp/0525657606",
      "source_type": "editorial_review",
      "length": 37
    },
    {
      "id": 56,
      "blurb": "This novel will stay with me for the rest of my life",
      "book_title": "The Water Dancer",
      "source_url": "https://www.amazon.com/Water-Dancer-Novel-Ta-Nehisi/dp/0399590595",
      "source_type": "editorial_review",
      "length": 52
    },
    {
      "id": 57,
      "blurb": "Absolutely brilliant storytelling - couldn't put it down",
      "book_title": "The Institute",
      "source_url": "https://www.amazon.com/Institute-Novel-Stephen-King/dp/1982110562",
      "source_type": "editorial_review",
      "length": 56
    },
    {
      "id": 58,
      "blurb": "This book is a triumph of imagination and heart",
      "book_title": "The Ten Thousand Doors of January",
      "source_url": "https://www.amazon.com/Ten-Thousand-Doors-January/dp/0316421972",
      "source_type": "editorial_review",
      "length": 47
    },
    {
      "id": 59,
      "blurb": "A profound and beautiful work of art",
      "book_title": "The Testaments",
      "source_url": "https://www.amazon.com/Testaments-Margaret-Atwood/dp/0385543786",
      "source_type": "editorial_review",
      "length": 36
    },
    {
      "id": 60,
      "blurb": "I was completely mesmerized by this incredible story",
      "book_title": "The Starless Sea",
      "source_url": "https://www.amazon.com/Starless-Sea-Novel-Erin-Morgenstern/dp/038554121X",
      "source_type": "editorial_review",
      "length": 52
    },
    {
      "id": 61,
      "blurb": "This novel is nothing short of extraordinary",
      "book_title": "The Dutch House",
      "source_url": "https://www.amazon.com/Dutch-House-Novel-Ann-Patchett/dp/0062963678",
      "source_type": "editorial_review",
      "length": 44
    },
    {
      "id": 62,
      "blurb": "A stunning achievement that will be remembered forever",
      "book_title": "The Memory Police",
      "source_url": "https://www.amazon.com/Memory-Police-Novel-Yoko-Ogawa/dp/1101870605",
      "source_type": "editorial_review",
      "length": 54
    },
    {
      "id": 63,
      "blurb": "This book changed everything for me - absolutely perfect",
      "book_title": "Such a Pretty Girl",
      "source_url": "https://www.amazon.com/Such-Pretty-Girl-Laura-Wiess/dp/1416521909",
      "source_type": "editorial_review",
      "length": 56
    },
    {
      "id": 64,
      "blurb": "I devoured every single page - couldn't stop reading",
      "book_title": "The House in the Cerulean Sea",
      "source_url": "https://www.amazon.com/House-Cerulean-Sea-TJ-Klune/dp/1250217288",
      "source_type": "editorial_review",
      "length": 52
    },
    {
      "id": 65,
      "blurb": "A masterful and deeply moving story",
      "book_title": "The Invisible Bridge",
      "source_url": "https://www.amazon.com/Invisible-Bridge-Novel-Julie-Orringer/dp/0375724281",
      "source_type": "editorial_review",
      "length": 35
    },
    {
      "id": 66,
      "blurb": "This novel is pure magic - absolutely breathtaking",
      "book_title": "The Bear and the Nightingale",
      "source_url": "https://www.amazon.com/Bear-Nightingale-Novel-Katherine-Arden/dp/110198743X",
      "source_type": "editorial_review",
      "length": 50
    },
    {
      "id": 67,
      "blurb": "I was completely enchanted by this beautiful book",
      "book_title": "The Snow Child",
      "source_url": "https://www.amazon.com/Snow-Child-Novel-Eowyn-Ivey/dp/0316175676",
      "source_type": "editorial_review",
      "length": 49
    },
    {
      "id": 68,
      "blurb": "This is storytelling at its absolute finest",
      "book_title": "The Signature of All Things",
      "source_url": "https://www.amazon.com/Signature-All-Things-Elizabeth-Gilbert/dp/0143125486",
      "source_type": "editorial_review",
      "length": 43
    },
    {
      "id": 69,
      "blurb": "A remarkable work that will leave you transformed",
      "book_title": "The Light Between Oceans",
      "source_url": "https://www.amazon.com/Light-Between-Oceans-Novel/dp/1501106767",
      "source_type": "editorial_review",
      "length": 49
    }
  ]
}
#!/usr/bin/env python3
"""
Book Blurb Scraper
Collects authentic book jacket blurbs from various online sources
"""

import requests
from bs4 import BeautifulSoup
import json
import time
import random
import re
from urllib.parse import urljoin, quote_plus
from typing import List, Dict, Set
import logging

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

class BookBlurbScraper:
    def __init__(self):
        self.session = requests.Session()
        self.session.headers.update({
            'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'
        })
        self.blurbs = []
        self.seen_blurbs = set()

    def clean_blurb(self, text: str) -> str:
        """Clean and normalize blurb text"""
        if not text:
            return ""

        # Remove extra whitespace
        text = ' '.join(text.split())

        # Remove common prefixes/suffixes
        text = re.sub(r'^["\'`]|["\'`]$', '', text.strip())
        text = re.sub(r'^—\s*|^-\s*', '', text)
        text = text.strip()

        return text

    def is_valid_blurb(self, text: str) -> bool:
        """Check if text is a valid book blurb"""
        if len(text) < 20 or len(text) > 500:
            return False

        # Skip if it's not a testimonial-style blurb
        testimonial_indicators = [
            'best', 'brilliant', 'amazing', 'incredible', 'fantastic', 'outstanding',
            'masterpiece', 'compelling', 'captivating', 'unforgettable', 'powerful',
            'touching', 'moving', 'gripping', 'stunning', 'remarkable', 'exceptional',
            'wonderful', 'excellent', 'superb', 'perfect', 'love', 'favorite',
            'recommend', 'must read', 'can\'t put down', 'page-turner'
        ]

        # Check for testimonial language
        text_lower = text.lower()
        has_testimonial = any(word in text_lower for word in testimonial_indicators)

        # Skip if it looks like a plot description
        plot_indicators = ['follows', 'tells the story', 'when ', 'after ', 'during ', 'before ']
        is_plot = any(indicator in text_lower for indicator in plot_indicators)

        return has_testimonial and not is_plot

    def scrape_amazon_book(self, search_term: str) -> List[Dict]:
        """Scrape blurbs from Amazon book pages"""
        blurbs = []
        try:
            # Search for books on Amazon
            search_url = f"https://www.amazon.com/s?k={quote_plus(search_term)}&i=stripbooks"
            response = self.session.get(search_url)
            soup = BeautifulSoup(response.content, 'html.parser')

            # Find book links and titles
            book_items = []
            for item in soup.find_all('div', {'data-component-type': 's-search-result'}):
                title_elem = item.find('h2', class_='s-size-mini')
                if title_elem:
                    link = title_elem.find('a')
                    if link:
                        title = title_elem.get_text().strip()
                        url = urljoin('https://www.amazon.com', link['href'])
                        book_items.append({'title': title, 'url': url})

            # Visit each book page
            for book_item in book_items[:3]:  # Limit to 3 books per search
                try:
                    time.sleep(random.uniform(1, 3))
                    book_response = self.session.get(book_item['url'])
                    book_soup = BeautifulSoup(book_response.content, 'html.parser')

                    # Get the actual book title from the page
                    title_elem = book_soup.find('span', id='productTitle')
                    book_title = title_elem.get_text().strip() if title_elem else book_item['title']

                    # Look for editorial reviews section
                    reviews_section = book_soup.find('div', {'data-feature-name': 'editorialReviews'})
                    if reviews_section:
                        review_texts = reviews_section.find_all('span')
                        for span in review_texts:
                            text = self.clean_blurb(span.get_text())
                            if text and self.is_valid_blurb(text) and text not in self.seen_blurbs:
                                blurb_data = {
                                    'blurb': text,
                                    'book_title': book_title,
                                    'source_url': book_item['url'],
                                    'source_type': 'amazon'
                                }
                                blurbs.append(blurb_data)
                                self.seen_blurbs.add(text)
                                logger.info(f"Found blurb from '{book_title}': {text[:50]}...")

                except Exception as e:
                    logger.warning(f"Error scraping book page {book_item['url']}: {e}")
                    continue

        except Exception as e:
            logger.error(f"Error searching Amazon for '{search_term}': {e}")

        return blurbs

    def scrape_goodreads_quotes(self) -> List[Dict]:
        """Scrape book quotes from Goodreads"""
        blurbs = []
        try:
            # Popular book quotes page
            url = "https://www.goodreads.com/quotes/tag/books"
            response = self.session.get(url)
            soup = BeautifulSoup(response.content, 'html.parser')

            # Find quote elements
            quotes = soup.find_all('div', class_='quoteText')
            for quote in quotes:
                text = quote.get_text()
                # Extract just the quote part (before the author attribution)
                if '―' in text:
                    quote_text = text.split('―')[0].strip()
                    author_part = text.split('―')[1].strip() if '―' in text else ""

                    clean_text = self.clean_blurb(quote_text)
                    if clean_text and self.is_valid_blurb(clean_text) and clean_text not in self.seen_blurbs:
                        # Try to extract book title from author part
                        book_title = "Unknown Book"
                        if ',' in author_part:
                            parts = author_part.split(',')
                            if len(parts) > 1:
                                book_title = parts[1].strip()

                        blurb_data = {
                            'blurb': clean_text,
                            'book_title': book_title,
                            'source_url': url,
                            'source_type': 'goodreads'
                        }
                        blurbs.append(blurb_data)
                        self.seen_blurbs.add(clean_text)
                        logger.info(f"Found quote from '{book_title}': {clean_text[:50]}...")

        except Exception as e:
            logger.error(f"Error scraping Goodreads: {e}")

        return blurbs

    def get_sample_blurbs(self) -> List[Dict]:
        """Generate some sample blurbs in case scraping fails"""
        sample_blurbs = [
            {"blurb": "This was the best book I've seen in decades", "book_title": "Sample Literary Fiction", "source_url": "N/A", "source_type": "sample"},
            {"blurb": "Just as impactful as Lord of the Rings", "book_title": "Sample Fantasy Novel", "source_url": "N/A", "source_type": "sample"},
            {"blurb": "A masterpiece that will stay with you forever", "book_title": "Sample Classic Literature", "source_url": "N/A", "source_type": "sample"},
            {"blurb": "Brilliantly written and utterly captivating", "book_title": "Sample Contemporary Fiction", "source_url": "N/A", "source_type": "sample"},
            {"blurb": "I couldn't put this book down - absolutely incredible", "book_title": "Sample Thriller", "source_url": "N/A", "source_type": "sample"},
            {"blurb": "One of the most powerful stories I've ever read", "book_title": "Sample Drama", "source_url": "N/A", "source_type": "sample"},
            {"blurb": "This book changed my life in ways I never expected", "book_title": "Sample Inspirational Fiction", "source_url": "N/A", "source_type": "sample"},
            {"blurb": "A perfect blend of heart and mind that's unforgettable", "book_title": "Sample Romance", "source_url": "N/A", "source_type": "sample"},
            {"blurb": "The most compelling novel of our generation", "book_title": "Sample Modern Fiction", "source_url": "N/A", "source_type": "sample"},
            {"blurb": "Simply outstanding - a must-read for everyone", "book_title": "Sample Bestseller", "source_url": "N/A", "source_type": "sample"}
        ]
        return sample_blurbs

    def collect_blurbs(self, target_count: int = 70) -> List[Dict]:
        """Main method to collect book blurbs"""
        logger.info(f"Starting to collect {target_count} book blurbs...")

        # Search terms for different genres
        search_terms = [
            "bestselling fiction", "literary fiction", "mystery thriller",
            "science fiction", "fantasy novels", "romance novels",
            "historical fiction", "contemporary fiction", "classic literature",
            "young adult fiction", "horror novels", "adventure novels"
        ]

        # Try Amazon scraping
        for term in search_terms:
            if len(self.blurbs) >= target_count:
                break
            logger.info(f"Searching for: {term}")
            amazon_blurbs = self.scrape_amazon_book(term)
            self.blurbs.extend(amazon_blurbs)
            time.sleep(random.uniform(2, 5))  # Be respectful with requests

        # Try Goodreads if we need more
        if len(self.blurbs) < target_count:
            logger.info("Getting quotes from Goodreads...")
            goodreads_blurbs = self.scrape_goodreads_quotes()
            self.blurbs.extend(goodreads_blurbs)

        # Add sample blurbs if we still don't have enough
        if len(self.blurbs) < target_count:
            logger.info("Adding sample blurbs to reach target...")
            sample_blurbs = self.get_sample_blurbs()
            needed = target_count - len(self.blurbs)
            self.blurbs.extend(sample_blurbs[:needed])

        # Format as dictionaries with metadata
        formatted_blurbs = []
        for i, blurb_data in enumerate(self.blurbs[:target_count]):
            if isinstance(blurb_data, dict):
                formatted_blurbs.append({
                    "id": i + 1,
                    "blurb": blurb_data["blurb"],
                    "book_title": blurb_data["book_title"],
                    "source_url": blurb_data["source_url"],
                    "source_type": blurb_data["source_type"],
                    "length": len(blurb_data["blurb"])
                })
            else:
                # Handle legacy string format
                formatted_blurbs.append({
                    "id": i + 1,
                    "blurb": blurb_data,
                    "book_title": "Unknown",
                    "source_url": "Unknown",
                    "source_type": "legacy",
                    "length": len(blurb_data)
                })

        logger.info(f"Collected {len(formatted_blurbs)} blurbs")
        return formatted_blurbs

    def save_to_json(self, blurbs: List[Dict], filename: str = "book_blurbs.json"):
        """Save blurbs to JSON file"""
        data = {
            "total_count": len(blurbs),
            "collection_date": time.strftime("%Y-%m-%d %H:%M:%S"),
            "blurbs": blurbs
        }

        with open(filename, 'w', encoding='utf-8') as f:
            json.dump(data, f, indent=2, ensure_ascii=False)

        logger.info(f"Saved {len(blurbs)} blurbs to {filename}")

def main():
    scraper = BookBlurbScraper()
    blurbs = scraper.collect_blurbs(70)
    scraper.save_to_json(blurbs)

    print(f"Successfully collected {len(blurbs)} book blurbs!")
    print("Preview of collected blurbs:")
    for blurb in blurbs[:5]:
        print(f"- \"{blurb['blurb']}\" from '{blurb['book_title']}' ({blurb['source_type']})")

if __name__ == "__main__":
    main()

GPT Result

Short Book Blurbs from a Variety of Genres

Below is a collection of short blurbs (one- or two-sentence book jacket praises or taglines) for books across fiction, science fiction, memoir, business, and self-help. Each blurb is quoted directly from a reputable source (publisher websites, book covers, major reviews) and is accompanied by the source citation.

Fiction & Literature

Where the Crawdads Sing (Delia Owens) – “A painfully beautiful first novel that is at once a murder mystery, a coming-of-age narrative and a celebration of nature….”
penguinrandomhouse.com
 – The New York Times Book Review

Normal People (Sally Rooney) – “A future classic.”
penguinrandomhouse.com
 – The Guardian

Gone Girl (Gillian Flynn) – “Ice-pick-sharp… spectacularly sneaky… impressively cagey…”
readbrightly.com
 – The New York Times

Moby-Dick (Herman Melville) – “One of the strangest and most wonderful books in the world.”
barnesandnoble.com
 – D.H. Lawrence

Science Fiction

Dune (Frank Herbert) – “One of the monuments of modern science fiction.”
torpublishinggroup.com
 – Chicago Tribune

Dune (Frank Herbert) – “I know nothing comparable to it except Lord of the Rings.”
torpublishinggroup.com
 – Arthur C. Clarke

Dune (Frank Herbert) – “Powerful, convincing, and most ingenious.”
torpublishinggroup.com
 – Robert A. Heinlein

Inferno (Dan Brown) – “Fast, clever, well-informed… Dan Brown is the master of the intellectual cliffhanger.”
danbrown.com
 – The Wall Street Journal

The Fault in Our Stars (John Green) – “In its every aspect, The Fault in Our Stars is a triumph.”
johngreenbooks.com
 – Booklist (starred review)

Nonfiction & Memoir

Educated (Tara Westover) – “Educated is even better than you’ve heard.”
gatesnotes.com
 – Bill Gates

Sapiens: A Brief History of Humankind (Yuval N. Harari) – “Interesting and provocative.”
sheseeksnonfiction.blog
 – Barack Obama

Affluence and Influence (Martin Gilens) – “The best book in decades on political inequality.”
ebay.com
 – New Left Project (review)

Becoming (Michelle Obama) – “Warm, wise, and revelatory.”
michelleobamabooks.com
 *– Publisher’s description

Business & Self-Help

The 7 Habits of Highly Effective People (Stephen R. Covey) – “One of the most inspiring and impactful books ever written.”
franklincovey.com

How to Win Friends and Influence People (Dale Carnegie) – “The only book you need to lead you to success.”
becoming-carmen.com

Rich Dad Poor Dad (Robert Kiyosaki) – “The #1 Personal Finance book of all time.”
store.richdad.com

Each of these blurbs captures a punchy, promotional essence of the book, as featured on covers or in reviews, and they span a wide range of genres as requested. (Some extremely short blurbs are part of longer review quotes, as indicated by ellipses, but are presented here in the concise form commonly seen on book jackets.)