maria-antoniak / goodreads-scraper

A Python scraper for Goodreads books and reviews.
GNU General Public License v3.0
271 stars 82 forks source link

Book scraper not finding elements #39

Open DrKenReid opened 1 year ago

DrKenReid commented 1 year ago

Hi,

I installed this script and ran it, came across this error:

AttributeError: 'NoneType' object has no attribute 'text'

Looked at the code, the script wasn't finding the book_title object. I added a "continue if book_title missing", as recommended here. It ran the tests without error after this, until I inspected JSON file which is empty.

I thought perhaps it was not connecting, firewall issue or something similar, so I printed out the raw soup. It seems book_title is missing, and there is intentionally obfuscation from goodreads through a function (some information is still there but some is missing).

Here is the raw output scraped by soup, for reference:

<!DOCTYPE html>
<html lang="en"><head><script>var ue_t0=window.ue_t0||+new Date();(function(e){var c=e,a={main_scope:"mainscopecsm",q:[],t0:c.ue_t0||+new Date(),d:g};function g(h){return +new Date()-(h?0:a.t0)}function d(h){return function(){a.q.push({n:h,a:arguments,t:a.d()})}}function b(k,j,h){var i={m:k,f:j,l:h,fromOnError:1,args:arguments};c.ueLogError(i);return false}b.skipTrace=1;e.onerror=b;function f(){c.uex("ld")}if(e.addEventListener){e.addEventListener("load",f,false)}else{if(e.attachEvent){e.attachEvent("onload",f)}}a.tag=d("tag");a.log=d("log");a.reset=d("rst");c.ue_csm=c;c.ue=a;c.ueLogError=d("err");c.ues=d("ues");c.uet=d("uet");c.uex=d("uex");c.uet("ue")})(window);(function(e,d){var a=e.ue||{};function c(g){if(!g){return}var f=d.head||d.getElementsByTagName("head")[0]||d.documentElement,h=d.createElement("script");h.async="async";h.src=g;f.insertBefore(h,f.firstChild)}function b(){var k=e.ue_cdn||"z-ecx.images-amazon.com",g=e.ue_cdns||"images-na.ssl-images-amazon.com",j="/images/G/01/csminstrumentation/",h=e.ue_file||"ue-full-ef584a44e8ea58e3d4d928956600a9b6._V1_.js",f,i;if(h.indexOf("NSTRUMENTATION_FIL")>=0){return}if("ue_https" in e){f=e.ue_https}else{f=e.location&&e.location.protocol=="https:"?1:0}i=f?"https://":"http://";i+=f?g:k;i+=j;i+=h;c(i)}if(!e.ue_inline){b()}a.uels=c;e.ue=a})(window,document);</script><script>!function(){function n(n,t){var r=i(n);return t&&(r=r("instance",t)),r}var r=[],c=0,i=function(t){return function(){var n=c++;return r.push([t,[].slice.call(arguments,0),n,{time:Date.now()}]),i(n)}};n._s=r,this.csa=n}()
    csa('Config', {
      'Application': 'GoodreadsSirius',
      'Events.SushiEndpoint': 'https://unagi.amazon.com/1/events/com.amazon.csm.csa.prod',
      'Events.Namespace': 'csa',
      'CacheDetection.RequestID': '',
      'ObfuscatedMarketplaceId': 'A1PQBFHBHS6YH1'
    });

    csa('Events')('setEntity', {
      'session': { 'id':'' },
      'page': {'requestId': '', 'meaningful': 'interactive'}
    });

    var e = document.createElement("script"); e.src = "https://m.media-amazon.com/images/I/41mrkPcyPwL.js"; document.head.appendChild(e);
</script><script>!function(a9,a,p,s,t,A,g){if(a[a9])return;function q(c,r){a[a9]._Q.push([c,r])}a[a9]={init:function(){q("i",arguments)},fetchBids:function(){q("f",arguments)},setDisplayBids:function(){},targetingKeys:function(){return[]},_Q:[]};A=p.createElement(s);A.async=!0;A.src=t;g=p.getElementsByTagName(s)[0];g.parentNode.insertBefore(A,g)}("apstag",window,document,"script","//c.amazon-adsystem.com/aax2/apstag.js");</script><script async="" src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script><script>window.googletag = window.googletag || { cmd: [] };</script><meta content="width=device-width" name="viewport"/><meta charset="utf-8"/><link href="/favicon.ico" rel="favicon"/><meta content="initial-scale=1.0, width=device-width" name="viewport"/><meta content="Goodreads" property="og:title"/><meta content="website" property="og:type"/><meta content="https://s.gr-assets.com/assets/facebook/goodreads_wide-e23f6858b6bf20dcaf8493237a214a0e.png" property="og:image"/><meta content="https://www.goodreads.com/book/show/79550.The_Summer_Book" property="og:url"/><meta content="Goodreads" property="og:site_name"/><meta content="Discover and share books you love on Goodreads." property="og:description"/><meta content="5" name="next-head-count"/><link as="style" href="/_next/static/css/node_vendors~253ae210.5a142c8b.chunk.css" rel="preload"/><link data-n-g="" href="/_next/static/css/node_vendors~253ae210.5a142c8b.chunk.css" rel="stylesheet"/><link as="style" href="/_next/static/css/pages/book/show/%5Bbook_id%5D.31b7a621.chunk.css" rel="preload"/><link data-n-p="" href="/_next/static/css/pages/book/show/%5Bbook_id%5D.31b7a621.chunk.css" rel="stylesheet"/><noscript data-n-css=""></noscript><link as="script" href="/_next/static/chunks/main-5203f0731cb059a1ae11.js" rel="preload"/><link as="script" href="/_next/static/chunks/webpack-132aa4ebc4035b35ec5f.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~253ae210.9359ae64a50cada6ec2f.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~2a42e354.380b372e6a9224625307.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~15ae29a2.3979f2d906cdcf615eb1.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~f45575e3.e33e3220c7f23a7242a3.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~e097a484.e260ec1c8bfd8114a944.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~313ef737.0cc9da4d7ba84802c322.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~577b3ae9.da6a57a3ede1288bba54.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~4e60a0fb.db81b8cb513b8cc21d71.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~b1a98620.ac47f11f69a688700f8f.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~7274e1de.65c7b8076203f758b402.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~1f20a385.70e7e969a6e8582a27e5.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~70aabc29.d628571d0edd71ab6f37.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~f9ca8911.feee87265e05daf4213e.js" rel="preload"/><link as="script" href="/_next/static/chunks/pages/_app-3edede47f10f01249186.js" rel="preload"/><link as="script" href="/_next/static/chunks/pages/book/show/%5Bbook_id%5D-3f527428a69a67c43c71.js" rel="preload"/></head><body><div id="__next"><header class="Header" data-auth="0" id="Header"><div class="SiteHeaderBanner"></div><div class="Header__contents"><button aria-label="Start Search" class="Header__toggleSearchContainer" type="button"><i class="Icon SearchIcon"><svg viewbox="0 0 24 24"><path d="M10.9942371,4 C14.8570476,4 17.9884742,7.1314266 17.9884742,10.9942371 C17.9884742,12.7320284 17.3547056,14.3217952 16.3056938,15.5450121 L19.6195637,18.858691 C19.8296728,19.0688002 19.8296728,19.4094545 19.6195637,19.6195637 C19.4094545,19.8296728 19.0688002,19.8296728 18.858691,19.6195637 L18.858691,19.6195637 L15.5450121,16.3056938 C14.3217952,17.3547056 12.7320284,17.9884742 10.9942371,17.9884742 C7.1314266,17.9884742 4,14.8570476 4,10.9942371 C4,7.1314266 7.1314266,4 10.9942371,4 Z M10.9942371,5.07603647 C7.72570514,5.07603647 5.07603647,7.72570514 5.07603647,10.9942371 C5.07603647,14.262769 7.72570514,16.9124377 10.9942371,16.9124377 C14.262769,16.9124377 16.9124377,14.262769 16.9124377,10.9942371 C16.9124377,7.72570514 14.262769,5.07603647 10.9942371,5.07603647 Z"></path></svg></i></button><a aria-label="Home" class="Header__logo" href="/?ref=nav_hom" tabindex="0"><svg class="GoodreadsWordmark" viewbox="0 0 673.8 144" xmlns="http://www.w3.org/2000/svg"><path d="m66.7 86.4h-0.3c-3.3 14.5-18.2 23-32.2 23-22.9 0-34.2-18.2-34.2-39.2 0-22 12.1-40.2 35.2-40.2 15.6 0 27.9 10.4 31.1 23.8h0.3v-21.9h3.2v79.3c0 22.3-12.8 32.8-34.1 32.8-16.6 0-30.8-7.5-31.3-25.8h3.2c0.6 16.3 13.1 22.6 27.9 22.6 19.8 0 31.1-9.4 31.1-29.7v-24.7zm-31.5-53.2c-21.2 0-32.1 17.1-32.1 37 0 20.3 10.8 36.1 30.8 36.1 21.1 0 32.6-16.3 32.6-36.1 0.2-18.9-10.7-37-31.3-37z" fill="#372213"></path><path d="m115.8 30c23.9 0 36.8 20.6 36.8 42.9 0 22.5-12.9 42.9-37 42.9-23.9 0-36.9-20.4-36.9-42.9 0.1-22.3 13-42.9 37.1-42.9zm0 82.6c21.8 0 33.6-19 33.6-39.7 0-20.4-11.8-39.7-33.6-39.7-22.2 0-33.8 19.3-33.8 39.7 0 20.7 11.6 39.7 33.8 39.7z" fill="#372213"></path><path d="m194.6 30c23.9 0 36.8 20.6 36.8 42.9 0 22.5-12.9 42.9-37 42.9-23.9 0-36.8-20.4-36.8-42.9 0-22.3 12.9-42.9 37-42.9zm0 82.6c21.9 0 33.6-19 33.6-39.7 0-20.4-11.8-39.7-33.6-39.7-22.2 0-33.8 19.3-33.8 39.7-0.1 20.7 11.6 39.7 33.8 39.7z" fill="#372213"></path><path d="m304.4 0h3.2v113.9h-3.2v-23h-0.3c-4.1 14.3-16.1 24.9-32.8 24.9-21.7 0-34.9-18-34.9-42.7 0-23 12.3-43.1 34.9-43.1 17.4 0 29 10.1 32.8 24.9h0.3v-54.9zm-33.1 33.2c-22.5 0-31.7 20.9-31.7 39.9 0 21 10.5 39.5 31.7 39.5 21.1 0 33.2-18.3 33.2-39.5-0.1-25.4-13.3-39.9-33.2-39.9z" fill="#372213"></path><path d="m323.1 31.6h9.2v19.3h0.3c5.1-13.2 16.3-21.1 31.1-20.4v10c-18.2-1-30.6 12.4-30.6 29.5v43.9h-10.1v-82.3z" fill="#372213"></path><path d="m372.4 75.4c0.1 14.7 7.8 32.4 27.1 32.4 14.7 0 22.6-8.6 25.8-21h10.1c-4.3 18.7-15.2 29.5-35.9 29.5-26.1 0-37.1-20.1-37.1-43.5 0-21.7 11-43.5 37.1-43.5 26.5 0 37 23.1 36.2 46.2h-63.3zm53.2-8.4c-0.5-15.1-9.9-29.4-26.2-29.4s-25.4 14.4-27 29.4h53.2z" fill="#372213"></path><path d="m444.3 56.8c0.9-19.3 14.5-27.6 33.3-27.6 14.5 0 30.3 4.5 30.3 26.5v43.7c0 3.8 1.9 6.1 5.9 6.1 1.1 0 2.4-0.3 3.2-0.6v8.4c-2.2 0.5-3.8 0.6-6.6 0.6-10.2 0-11.8-5.7-11.8-14.4h-0.3c-7 10.7-14.2 16.7-30 16.7-15.1 0-27.6-7.5-27.6-24.1 0-23.1 22.5-23.9 44.2-26.5 8.3-1 12.9-2.1 12.9-11.2 0-13.6-9.7-16.9-21.6-16.9-12.4 0-21.7 5.8-22 19.2h-9.9zm53.6 12.1h-0.3c-1.3 2.4-5.8 3.2-8.5 3.7-17.1 3-38.3 2.9-38.3 19 0 10.1 8.9 16.3 18.3 16.3 15.3 0 28.9-9.7 28.7-25.8v-13.2z" fill="#372213"></path><path d="m596.5 113.9h-9.2v-15.7h-0.3c-4.3 10.7-17.4 18-29.3 18-25.1 0-37-20.2-37-43.5s11.9-43.5 37-43.5c12.3 0 24.2 6.2 28.5 18h0.3v-47.2h10v113.9zm-38.9-6.1c21.4 0 28.9-18 28.9-35.1s-7.5-35.1-28.9-35.1c-19.1 0-27 18-27 35.1s7.8 35.1 27 35.1z" fill="#372213"></path><path d="m660.9 55.6c-0.5-12.4-10-18-21.5-18-8.9 0-19.4 3.5-19.4 14.2 0 8.9 10.2 12.1 17.1 13.9l13.4 3c11.5 1.8 23.4 8.5 23.4 22.8 0 17.9-17.7 24.7-33 24.7-19.1 0-32.2-8.9-33.8-29h10c0.8 13.5 10.9 20.6 24.3 20.6 9.4 0 22.5-4.1 22.5-15.6 0-9.6-8.9-12.7-18-15l-12.9-2.9c-13.1-3.5-23-8-23-22 0-16.7 16.4-23.1 30.9-23.1 16.4 0 29.5 8.6 30.1 26.5h-10.1z" fill="#372213"></path></svg></a><div class="Header__primaryNavContainer" data-testid="primaryNavContainer"><nav aria-label="Primary Navigation" class="HeaderPrimaryNav" role="navigation"><ul class="HeaderPrimaryNav__list"><li><a href="/?ref=nav_hom" tabindex="0">Home</a></li><li><a href="/review/list?ref=nav_mybooks" tabindex="0">My Books</a></li><li class="HeaderPrimaryNav__dropDown"><a aria-haspopup="true" href="#?ref=nav_brws" tabindex="0">Browse ▾</a><div class="HeaderNavDropdown HeaderNavDropdown--browse"><ul><li><a href="/recommendations?ref=nav_brws_recs" tabindex="0">Recommendations</a></li><li><a href="/choiceawards?ref=nav_brws_gca" tabindex="0">Choice Awards</a></li><li><a href="/giveaway?ref=nav_brws_giveaways" tabindex="0">Giveaways</a></li><li><a href="/new_releases?ref=nav_brws_newrels" tabindex="0">New Releases</a></li><li><a href="/list?ref=nav_brws_lists" tabindex="0">Lists</a></li><li><a href="/book?ref=nav_brws_explore" tabindex="0">Explore</a></li><li><a href="/news?ref=nav_brws_news" tabindex="0">News &amp; Interviews</a></li></ul><div class="Spotlight__loadingState"><div class="LoadingCard"><h3 class="Text H3">Loading...</h3><div class="Button__container"><button class="Button Button--primary Button--small Button--disabled" disabled="" type="button"><span class="Button__labelItem"><i class="Icon LoadingIcon"><svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12,4.5 C16.1421356,4.5 19.5,7.85786438 19.5,12 C19.5,16.1421356 16.1421356,19.5 12,19.5 C11.7238576,19.5 11.5,19.2761424 11.5,19 C11.5,18.7238576 11.7238576,18.5 12,18.5 C15.5898509,18.5 18.5,15.5898509 18.5,12 C18.5,8.41014913 15.5898509,5.5 12,5.5 C11.7238576,5.5 11.5,5.27614237 11.5,5 C11.5,4.72385763 11.7238576,4.5 12,4.5 Z M5.52355661,12.5744813 C5.58966824,13.3204488 5.78546239,14.0531384 6.10903452,14.7470411 C6.22573733,14.9973111 6.11745975,15.2948013 5.86718976,15.4115041 C5.61691978,15.5282069 5.31942955,15.4199293 5.20272674,15.1696593 C4.8298373,14.3699954 4.60380023,13.5241324 4.52746085,12.6627606 C4.50308319,12.3876964 4.70630482,12.1449507 4.98136906,12.1205731 C5.25643331,12.0961954 5.49917895,12.299417 5.52355661,12.5744813 Z M6.12910354,8.15473449 C6.37034463,8.28911211 6.4569746,8.59361124 6.32259698,8.83485234 C5.9995469,9.4148072 5.76629979,10.041192 5.63203591,10.6910042 C5.57615976,10.9614343 5.31163624,11.1353647 5.04120609,11.0794885 C4.77077594,11.0236124 4.59684555,10.7590889 4.6527217,10.4886587 C4.80759392,9.73910605 5.07653051,9.01687717 5.44898569,8.34822792 C5.58336331,8.10698683 5.88786244,8.02035686 6.12910354,8.15473449 Z M10.5511551,5.13333871 C10.6272703,5.3987838 10.473788,5.67567308 10.2083429,5.75178823 C9.13089659,6.060741 8.17228812,6.63067331 7.39899784,7.40679228 C7.2040925,7.60241058 6.88751054,7.60298855 6.69189224,7.40808321 C6.49627394,7.21317787 6.49569597,6.89659591 6.69060131,6.70097761 C7.58329166,5.8050218 8.69055678,5.14670697 9.93270558,4.79052654 C10.1981507,4.71441138 10.4750399,4.86789362 10.5511551,5.13333871 Z"><animatetransform attributename="transform" dur="0.6s" from="0 12 12" repeatcount="indefinite" to="360 12 12" type="rotate"></animatetransform></path></svg></i></span></button></div></div></div></div></li><li class="HeaderPrimaryNav__dropDown"><a aria-haspopup="true" href="#?ref=nav_comm" tabindex="0">Community ▾</a><div class="HeaderNavDropdown"><ul><li><a href="/group?ref=nav_comm_groups" tabindex="0">Groups</a></li><li><a href="/quotes?ref=nav_comm_quotes" tabindex="0">Quotes</a></li><li><a href="/ask_the_author?ref=nav_comm_askauthor" tabindex="0">Ask the Author</a></li><li><a href="/user/best_reviewers?ref=nav_comm_people" tabindex="0">People</a></li></ul></div></li></ul></nav></div><div class="Header__searchContainer"><section class="HeaderSearch" role="search"><div aria-live="assertive" class="u-sr-only" role="region"></div><form action="https://www.goodreads.com/search" method="get"><input aria-autocomplete="list" aria-controls="search-listbox" aria-expanded="false" aria-label="Search by book title or ISBN" class="HeaderSearch__input" name="q" placeholder="Search books" role="combobox" spellcheck="false" type="text" value=""/><input name="ref" type="hidden" value="nav_sb_noss_l"/><button aria-label="Search" class="HeaderSearch__button" type="submit" value=""><i class="Icon SearchIcon"><svg viewbox="0 0 24 24"><path d="M10.9942371,4 C14.8570476,4 17.9884742,7.1314266 17.9884742,10.9942371 C17.9884742,12.7320284 17.3547056,14.3217952 16.3056938,15.5450121 L19.6195637,18.858691 C19.8296728,19.0688002 19.8296728,19.4094545 19.6195637,19.6195637 C19.4094545,19.8296728 19.0688002,19.8296728 18.858691,19.6195637 L18.858691,19.6195637 L15.5450121,16.3056938 C14.3217952,17.3547056 12.7320284,17.9884742 10.9942371,17.9884742 C7.1314266,17.9884742 4,14.8570476 4,10.9942371 C4,7.1314266 7.1314266,4 10.9942371,4 Z M10.9942371,5.07603647 C7.72570514,5.07603647 5.07603647,7.72570514 5.07603647,10.9942371 C5.07603647,14.262769 7.72570514,16.9124377 10.9942371,16.9124377 C14.262769,16.9124377 16.9124377,14.262769 16.9124377,10.9942371 C16.9124377,7.72570514 14.262769,5.07603647 10.9942371,5.07603647 Z"></path></svg></i></button></form></section></div><nav aria-label="Sign in or Join" class="HeaderSecondaryNav"><ul class="HeaderSecondaryNav__list HeaderSecondaryNav__list--signedOut"><li><a href="/user/sign_in">Sign in</a></li><li><a href="/user/sign_up">Join</a></li></ul></nav></div></header><div class="PageFrame" data-testid="pageFrame"><main class="PageFrame__main"><svg aria-label="Loading interface..." preserveaspectratio="none" role="img" viewbox="0 0 404 300"><title>Loading interface...</title><rect clip-path="url(#4eta7ijm6m5)" height="300" style="fill:url(#xucls59dm78)" width="404" x="0" y="0"></rect><defs><clippath id="4eta7ijm6m5"><rect height="28" rx="0" ry="0" width="307" x="50" y="7"></rect><rect height="128" rx="0" ry="0" width="91" x="16" y="53"></rect><rect height="13" rx="0" ry="0" width="114" x="130" y="60"></rect><rect height="8" rx="0" ry="0" width="106" x="130" y="77"></rect><rect height="6" rx="0" ry="0" width="240" x="130" y="113"></rect><rect height="6" rx="0" ry="0" width="240" x="130" y="133"></rect><rect height="5" rx="0" ry="0" width="240" x="130" y="124"></rect><circle cx="269" cy="127" r="2"></circle><rect height="5" rx="0" ry="0" width="61" x="130" y="90"></rect><rect height="5" rx="0" ry="0" width="61" x="198" y="90"></rect><rect height="9" rx="0" ry="0" width="28" x="130" y="146"></rect><rect height="9" rx="0" ry="0" width="28" x="165" y="146"></rect><rect height="9" rx="0" ry="0" width="28" x="200" y="146"></rect><rect height="9" rx="0" ry="0" width="28" x="235" y="146"></rect><rect height="9" rx="0" ry="0" width="28" x="270" y="146"></rect><rect height="5" rx="0" ry="0" width="61" x="264" y="90"></rect></clippath><lineargradient id="xucls59dm78"><stop offset="0%" stop-color="#e0dcd3" stop-opacity="1"><animate attributename="offset" dur="1s" keytimes="0; 0.25; 1" repeatcount="indefinite" values="-2; -2; 1"></animate></stop><stop offset="50%" stop-color="#f5f4f1" stop-opacity="1"><animate attributename="offset" dur="1s" keytimes="0; 0.25; 1" repeatcount="indefinite" values="-1; -1; 2"></animate></stop><stop offset="100%" stop-color="#e0dcd3" stop-opacity="1"><animate attributename="offset" dur="1s" keytimes="0; 0.25; 1" repeatcount="indefinite" values="0; 0; 3"></animate></stop></lineargradient></defs></svg></main></div><footer class="Footer"><div class="Footer__contents"><div class="Footer__column"><h3 class="Footer__heading">Company</h3><ul class="Footer__list"><li><a href="/about/us">About us</a></li><li><a href="/jobs">Careers</a></li><li><a href="/about/terms">Terms</a></li><li><a href="/about/privacy">Privacy</a></li><li><a href="https://help.goodreads.com/s/article/Goodreads-Interest-Based-Ads-Notice">Interest Based Ads</a></li><li><a href="/adprefs">Ad Preferences</a></li><li><a href="/help?action_type=help_web_footer">Help</a></li></ul></div><div class="Footer__column"><h3 class="Footer__heading">Work With Us</h3><ul class="Footer__list"><li><a href="/author/program">Authors</a></li><li><a href="/advertisers">Advertise</a></li><li><a href="/news?content_type=author_blogs">Authors &amp; ads blog</a></li><li><a href="/api">API</a></li></ul></div><div class="Footer__column"><h3 class="Footer__heading">Connect</h3><ul class="Footer__list--inline"><li><a aria-label="Facebook" href="https://www.facebook.com/Goodreads/"><i class="Icon FacebookIcon"><svg viewbox="0 0 24 24"><path clip-rule="evenodd" d="M22 12C22 6.47715 17.5229 2 12 2C6.47715 2 2 6.47715 2 12C2 16.9913 5.65686 21.1283 10.4375 21.8785V14.8906H7.89844V12H10.4375V9.79688C10.4375 7.29063 11.9304 5.90625 14.2146 5.90625C15.3087 5.90625 16.4531 6.10156 16.4531 6.10156V8.5625H15.1921C13.9499 8.5625 13.5625 9.33334 13.5625 10.1242V12H16.3359L15.8926 14.8906H13.5625V21.8785C18.3431 21.1283 22 16.9913 22 12Z" fill-rule="evenodd"></path></svg></i></a></li><li><a aria-label="Twitter" href="https://twitter.com/goodreads"><i class="Icon TwitterIcon"><svg viewbox="0 0 24 24"><path d="M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM14.615 7.725C13.285 7.725 12.205 8.805 12.205 10.135C12.205 10.325 12.225 10.51 12.27 10.685C10.265 10.585 8.49 9.625 7.3 8.165C7.095 8.52 6.975 8.935 6.975 9.375C6.975 10.21 7.4 10.95 8.05 11.38C7.655 11.37 7.285 11.26 6.96 11.08V11.11C6.96 12.28 7.79 13.25 8.895 13.475C8.695 13.53 8.48 13.56 8.26 13.56C8.105 13.56 7.955 13.545 7.805 13.515C8.11 14.475 9 15.17 10.055 15.19C9.23 15.835 8.19 16.22 7.06 16.22C6.865 16.22 6.675 16.21 6.485 16.185C7.54 16.875 8.81 17.275 10.17 17.275C14.605 17.275 17.03 13.6 17.03 10.415C17.03 10.31 17.03 10.205 17.025 10.105C17.495 9.765 17.905 9.34 18.23 8.855C17.8 9.045 17.335 9.175 16.845 9.235C17.345 8.935 17.725 8.465 17.905 7.9C17.44 8.175 16.925 8.375 16.375 8.485C15.935 8.015 15.31 7.725 14.615 7.725Z"></path></svg></i></a></li><li><a aria-label="Instagram" href="https://www.instagram.com/goodreads/"><i class="Icon InstagramIcon"><svg viewbox="0 0 24 24"><path clip-rule="evenodd" d="M12 22C6.47733 22 2 17.5227 2 12C2 6.47733 6.47733 2 12 2C17.5227 2 22 6.47733 22 12C22 17.5227 17.5227 22 12 22ZM12 7.0764C13.6038 7.0764 13.7936 7.0828 14.4262 7.11163C15.0123 7.13805 15.3302 7.23654 15.5416 7.31821C15.8218 7.42711 16.022 7.55763 16.2326 7.76741C16.4424 7.978 16.5729 8.17818 16.681 8.45843C16.7635 8.66982 16.8619 8.98771 16.8884 9.57303C16.9172 10.2064 16.9236 10.3962 16.9236 12C16.9236 13.6038 16.9172 13.7936 16.8884 14.4262C16.8619 15.0123 16.7635 15.3302 16.6818 15.5416C16.5729 15.8218 16.4424 16.022 16.2326 16.2326C16.0386 16.4318 15.8025 16.585 15.5416 16.681C15.3302 16.7635 15.0123 16.8619 14.427 16.8884C13.7936 16.9172 13.6038 16.9236 12 16.9236C10.3962 16.9236 10.2064 16.9172 9.57383 16.8884C8.98771 16.8619 8.66982 16.7635 8.45843 16.6818C8.17818 16.5729 7.978 16.4424 7.76741 16.2326C7.5682 16.0386 7.41498 15.8025 7.31901 15.5416C7.23654 15.3302 7.13805 15.0123 7.11163 14.427C7.0828 13.7936 7.0764 13.6038 7.0764 12C7.0764 10.3962 7.0828 10.2064 7.11163 9.57383C7.13805 8.98771 7.23654 8.66982 7.31821 8.45843C7.42711 8.17818 7.55763 7.978 7.76741 7.76741C7.978 7.55763 8.17818 7.42711 8.45843 7.31901C8.66982 7.23654 8.98771 7.13805 9.57303 7.11163C10.2064 7.0828 10.3962 7.0764 12 7.0764ZM12 5.99463C10.3689 5.99463 10.1648 6.00184 9.52419 6.03066C8.88441 6.06029 8.44802 6.16118 8.06688 6.31011C7.66571 6.46071 7.30227 6.69709 7.00193 7.00273C6.69677 7.30268 6.46069 7.66556 6.31011 8.06608C6.16118 8.44802 6.06029 8.88441 6.03066 9.52339C6.00184 10.164 5.99463 10.3689 5.99463 12C5.99463 13.6311 6.00184 13.8352 6.03066 14.4758C6.06029 15.1156 6.16118 15.552 6.31011 15.9331C6.46305 16.3287 6.66883 16.6634 7.00273 16.9981C7.33663 17.3312 7.67133 17.537 8.06608 17.6899C8.44802 17.8388 8.88441 17.9397 9.52339 17.9693C10.164 17.9982 10.3689 18.0054 12 18.0054C13.6311 18.0054 13.8352 17.9982 14.4758 17.9693C15.1156 17.9397 15.552 17.8388 15.9331 17.6899C16.3343 17.5393 16.6977 17.3029 16.9981 16.9973C17.3312 16.6634 17.537 16.3287 17.6899 15.9339C17.8388 15.552 17.9397 15.1156 17.9693 14.4766C17.9982 13.836 18.0054 13.6311 18.0054 12C18.0054 10.3689 17.9982 10.1648 17.9693 9.52419C17.9397 8.88441 17.8388 8.44802 17.6899 8.06688C17.5393 7.66571 17.3029 7.30227 16.9973 7.00193C16.6973 6.69677 16.3344 6.46069 15.9339 6.31011C15.552 6.16118 15.1156 6.06029 14.4766 6.03066C13.836 6.00184 13.6311 5.99463 12 5.99463ZM12.012 8.92525C10.3072 8.92525 8.92525 10.3072 8.92525 12.012C8.92525 13.7168 10.3072 15.0988 12.012 15.0988C13.7168 15.0988 15.0988 13.7168 15.0988 12.012C15.0988 10.3072 13.7168 8.92525 12.012 8.92525ZM12.012 14.0154C10.9056 14.0154 10.0086 13.1185 10.0086 12.012C10.0086 10.9056 10.9056 10.0086 12.012 10.0086C13.1185 10.0086 14.0154 10.9056 14.0154 12.012C14.0154 13.1185 13.1185 14.0154 12.012 14.0154ZM15.9083 8.78272C15.9083 8.38782 15.5882 8.06768 15.1933 8.06768C14.7984 8.06768 14.4782 8.38782 14.4782 8.78272C14.4782 9.17763 14.7984 9.49776 15.1933 9.49776C15.5882 9.49776 15.9083 9.17763 15.9083 8.78272Z" fill-rule="evenodd"></path></svg></i></a></li><li><a aria-label="LinkedIn" href="https://www.linkedin.com/company/goodreads-com/"><i class="Icon LinkedinIcon"><svg viewbox="0 0 24 24"><path clip-rule="evenodd" d="M12 22C6.47733 22 2 17.5227 2 12C2 6.47733 6.47733 2 12 2C17.5227 2 22 6.47733 22 12C22 17.5227 17.5227 22 12 22ZM7.684 10.3693V16.5447H9.456V10.3693H7.684ZM8.524 9.59733C9.19067 9.59733 9.60533 9.12333 9.60533 8.52533C9.592 7.916 9.19067 7.45467 8.53667 7.45467C7.88267 7.45467 7.45467 7.91733 7.45467 8.52733C7.45467 9.12533 7.87067 9.59733 8.512 9.59733H8.52467H8.524ZM16.5453 16.5453V13.1113C16.5453 11.1993 15.556 10.31 14.2967 10.31C13.282 10.31 12.646 10.9153 12.528 11.3387V10.3693H10.5373C10.5633 10.884 10.5373 16.5453 10.5373 16.5453H12.528V13.204C12.528 13.0173 12.52 12.832 12.5713 12.6993C12.708 12.3273 13.002 11.9427 13.5313 11.9427C14.222 11.9427 14.536 12.5127 14.536 13.3493V16.5453H16.5453Z" fill-rule="evenodd"></path></svg></i></a></li></ul></div><div class="Footer__right"><a class="Footer__badge" href="https://itunes.apple.com/app/apple-store/id355833469?pt=325668&amp;ct=mw_footer&amp;mt=8"><img alt="Download app for iOS" height="40" src="https://d15be2nos83ntc.cloudfront.net/images/badge-apple_app_store@2x.png" width="135"/></a><a class="Footer__badge" href="https://play.google.com/store/apps/details?id=com.goodreads&amp;utm_source=mw_footer&amp;pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1"><img alt="Download app for Android" height="40" src="https://d15be2nos83ntc.cloudfront.net/images/badge-google_play_store@2x.png" width="135"/></a><p class="Footer__copy">© <!-- -->2023<!-- --> Goodreads, Inc.</p></div></div></footer></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"apolloState":{},"apolloClient":null,"authContextParams":{"signedIn":false,"customerId":null,"legacyCustomerId":null,"role":"user"},"userAgentContextParams":{},"userAgent":"Python-urllib/3.9"}},"page":"/book/show/[book_id]","query":{"book_id":"79550.The_Summer_Book"},"buildId":"XyhL6FcLlDOUaAAO_x-IP","runtimeConfig":{"env":"Production"},"isFallback":false,"customServer":true,"gip":true,"locales":["en","ab","aa","af","ak","sq","am","ar","an","hy","as","av","ae","ay","az","bm","ba","eu","be","bn","bh","bi","bs","br","bg","my","ca","ch","ce","ceb","ny","zh","zh-TW","cv","kw","co","cr","hr","cs","da","dv","nl","eo","et","ee","fo","fj","fi","fr","ff","gl","ka","de","el","gn","gu","ht","ha","he","hz","hi","ho","hu","ia","id","ie","ilo","ga","ig","ik","io","is","it","iu","ja","jv","kl","kn","kr","ks","kk","km","ki","rw","ky","kv","kg","ko","ku","kj","la","lb","lg","li","ln","lo","lt","lu","lv","gv","mk","mg","ms","ml","mt","mi","mr","mh","mn","na","nv","nb","nd","ne","new","ng","nn","no","ii","nr","oc","oj","cu","om","or","os","pa","pi","fa","pl","ps","pt","qu","rm","rn","ro","ru","sa","sc","sd","se","sm","sg","sr","gd","sn","si","sk","sl","so","st","es","su","sw","ss","sv","ta","te","tg","th","ti","bo","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","cy","wo","fy","xh","yi","yo","za"]}</script><script nomodule="" src="/_next/static/chunks/polyfills-3c83d3e8d62bc1754e3c.js"></script><script async="" src="/_next/static/chunks/main-5203f0731cb059a1ae11.js"></script><script async="" src="/_next/static/chunks/webpack-132aa4ebc4035b35ec5f.js"></script><script async="" src="/_next/static/chunks/node_vendors~253ae210.9359ae64a50cada6ec2f.js"></script><script async="" src="/_next/static/chunks/node_vendors~2a42e354.380b372e6a9224625307.js"></script><script async="" src="/_next/static/chunks/node_vendors~15ae29a2.3979f2d906cdcf615eb1.js"></script><script async="" src="/_next/static/chunks/node_vendors~f45575e3.e33e3220c7f23a7242a3.js"></script><script async="" src="/_next/static/chunks/node_vendors~e097a484.e260ec1c8bfd8114a944.js"></script><script async="" src="/_next/static/chunks/node_vendors~313ef737.0cc9da4d7ba84802c322.js"></script><script async="" src="/_next/static/chunks/node_vendors~577b3ae9.da6a57a3ede1288bba54.js"></script><script async="" src="/_next/static/chunks/node_vendors~4e60a0fb.db81b8cb513b8cc21d71.js"></script><script async="" src="/_next/static/chunks/node_vendors~b1a98620.ac47f11f69a688700f8f.js"></script><script async="" src="/_next/static/chunks/node_vendors~7274e1de.65c7b8076203f758b402.js"></script><script async="" src="/_next/static/chunks/node_vendors~1f20a385.70e7e969a6e8582a27e5.js"></script><script async="" src="/_next/static/chunks/node_vendors~70aabc29.d628571d0edd71ab6f37.js"></script><script async="" src="/_next/static/chunks/node_vendors~f9ca8911.feee87265e05daf4213e.js"></script><script async="" src="/_next/static/chunks/pages/_app-3edede47f10f01249186.js"></script><script async="" src="/_next/static/chunks/pages/book/show/%5Bbook_id%5D-3f527428a69a67c43c71.js"></script><script async="" src="/_next/static/XyhL6FcLlDOUaAAO_x-IP/_buildManifest.js"></script><script async="" src="/_next/static/XyhL6FcLlDOUaAAO_x-IP/_ssgManifest.js"></script><div><!-- This is a random-length HTML comment: dpEaXYl00fM6l%#3nPZj#qhHSm]CU$i#EDMXsWO1Us^U@]VIBzXEy[#[yRa64MnEOB!4BGgnoTPY0wWKaiFHII(1kJBIlSM*JcQzQRuKrX8qbF$BYs]xKtIK#sfoIBbM@Ec7Ij![Q]L^U#(4A6@e8Tr49MEu*(T0UiH9xL46113&$aMIp^LQHpHUO^0dQ]mX1GY!FLeD^gcnVjG1IjwhuQ$PtP!Xx#i^2A02nggA7&ebzLc2kM90MEJBmZQEHhTwwgNhr6#DsCmRz*mgO^iVjaXHkwkfQiF$XPfD&NcBFYxv)OVTb!sbu]gf8s1qxt6@6th!J3v*k#&#dapv]x5PZlrz7TF7xzgYDv0VQ$hwZwvZxis[9FzagyTrO4iiMCv(u$*^Ey&e)hHogqXPk^Lm&mFv]S]TCmfYnsx[79vk3KGsY04o7CqUJ&FYVK20[7RoeTn&C45r7S52771w]Ic7&Df%aGNVW)uEZx9V$y7Oy#]$81rlHEEPFZiJ*eQ[3C#RX56@8hcfRJJ7SnmLu#[j1pyFf(B59RFYeZ6jh#O@d*^ --></div></body></html>
maria-antoniak commented 1 year ago

Hi Ken, I'm not certain of the cause of your error, but the Goodreads website went through some big changes last year and we haven't tested or updated for the new format. For reference, can you include some example book IDs that are leading to this error?

DrKenReid commented 1 year ago

Oh I apologize, I should have mentioned this in my original post, I used the example texts:

374233.If_on_a_Winter_s_Night_a_Traveler 18839.Orlando 79550.The_Summer_Book

lucy3 commented 1 year ago

There's been some really big changes to Goodreads recently. If you're trying to use get_books.py, I suspect that you might be facing the problem where most of a page is now dynamically loaded.

I hope you don't mind me budging in on this thread! This is what I've been using to get info from the each book's page in case it helps. I've had to reverse engineer through the page source to find the info I need (this example gets the first published date, plus a dictionary of book metadata):

from selenium import webdriver 
from selenium.webdriver.chrome.service import Service as ChromeService 
from webdriver_manager.chrome import ChromeDriverManager 

options = webdriver.ChromeOptions()
options.add_argument("start-maximized")
options.add_argument("disable-infobars")
options.add_argument("--disable-extensions")
options.add_argument("--disable-dev-shm-usage")
options.add_argument("--no-sandbox")
options.add_argument('--headless')
options.binary_location = "/usr/bin/chromium-browser"
driver = webdriver.Chrome(options=options)

url = 'https://www.goodreads.com/book/show/18478222-twelve-years-a-slave' # example book
done = False
while not done: 
    driver.get(url)
    if 'First published ' in driver.page_source: 
        done = True
    if not done: 
        time.sleep(10)
html = driver.page_source
soup = BeautifulSoup(html, "html.parser")
pub_info = soup.findAll("p", {"data-testid": "publicationInfo"})
assert len(pub_info) == 1
date_str = pub_info[0].text.replace('First published ', '') # e.g. "January 30, 2023"
book_data = json.loads(soup.find(id="__NEXT_DATA__").text) # some other data etc
work_key = None
for key in book_data['props']['pageProps']['apolloState'].keys(): 
    if key.startswith('Work'): 
        work_key = key
book_details = book_data['props']['pageProps']['apolloState'][work_key]['details']

The multiple attempts to grab a page helps me avoid cases where Selenium pulls in partial page source instead of the actual page for some reason.

(edited this to add the line for book_details so others can skip looking for a needle in a big json haystack)

DrKenReid commented 1 year ago

Hi @lucy3 - I hadn't used selenium before but it, and your solution, works great (though json needs imported). Thanks for posting your solution!

ossianhempel commented 1 year ago

Hi,

I installed this script and ran it, came across this error:

AttributeError: 'NoneType' object has no attribute 'text'

Looked at the code, the script wasn't finding the book_title object. I added a "continue if book_title missing", as recommended here. It ran the tests without error after this, until I inspected JSON file which is empty.

I thought perhaps it was not connecting, firewall issue or something similar, so I printed out the raw soup. It seems book_title is missing, and there is intentionally obfuscation from goodreads through a function (some information is still there but some is missing).

Here is the raw output scraped by soup, for reference:

<!DOCTYPE html>
<html lang="en"><head><script>var ue_t0=window.ue_t0||+new Date();(function(e){var c=e,a={main_scope:"mainscopecsm",q:[],t0:c.ue_t0||+new Date(),d:g};function g(h){return +new Date()-(h?0:a.t0)}function d(h){return function(){a.q.push({n:h,a:arguments,t:a.d()})}}function b(k,j,h){var i={m:k,f:j,l:h,fromOnError:1,args:arguments};c.ueLogError(i);return false}b.skipTrace=1;e.onerror=b;function f(){c.uex("ld")}if(e.addEventListener){e.addEventListener("load",f,false)}else{if(e.attachEvent){e.attachEvent("onload",f)}}a.tag=d("tag");a.log=d("log");a.reset=d("rst");c.ue_csm=c;c.ue=a;c.ueLogError=d("err");c.ues=d("ues");c.uet=d("uet");c.uex=d("uex");c.uet("ue")})(window);(function(e,d){var a=e.ue||{};function c(g){if(!g){return}var f=d.head||d.getElementsByTagName("head")[0]||d.documentElement,h=d.createElement("script");h.async="async";h.src=g;f.insertBefore(h,f.firstChild)}function b(){var k=e.ue_cdn||"z-ecx.images-amazon.com",g=e.ue_cdns||"images-na.ssl-images-amazon.com",j="/images/G/01/csminstrumentation/",h=e.ue_file||"ue-full-ef584a44e8ea58e3d4d928956600a9b6._V1_.js",f,i;if(h.indexOf("NSTRUMENTATION_FIL")>=0){return}if("ue_https" in e){f=e.ue_https}else{f=e.location&&e.location.protocol=="https:"?1:0}i=f?"https://":"http://";i+=f?g:k;i+=j;i+=h;c(i)}if(!e.ue_inline){b()}a.uels=c;e.ue=a})(window,document);</script><script>!function(){function n(n,t){var r=i(n);return t&&(r=r("instance",t)),r}var r=[],c=0,i=function(t){return function(){var n=c++;return r.push([t,[].slice.call(arguments,0),n,{time:Date.now()}]),i(n)}};n._s=r,this.csa=n}()
    csa('Config', {
      'Application': 'GoodreadsSirius',
      'Events.SushiEndpoint': 'https://unagi.amazon.com/1/events/com.amazon.csm.csa.prod',
      'Events.Namespace': 'csa',
      'CacheDetection.RequestID': '',
      'ObfuscatedMarketplaceId': 'A1PQBFHBHS6YH1'
    });

    csa('Events')('setEntity', {
      'session': { 'id':'' },
      'page': {'requestId': '', 'meaningful': 'interactive'}
    });

    var e = document.createElement("script"); e.src = "https://m.media-amazon.com/images/I/41mrkPcyPwL.js"; document.head.appendChild(e);
</script><script>!function(a9,a,p,s,t,A,g){if(a[a9])return;function q(c,r){a[a9]._Q.push([c,r])}a[a9]={init:function(){q("i",arguments)},fetchBids:function(){q("f",arguments)},setDisplayBids:function(){},targetingKeys:function(){return[]},_Q:[]};A=p.createElement(s);A.async=!0;A.src=t;g=p.getElementsByTagName(s)[0];g.parentNode.insertBefore(A,g)}("apstag",window,document,"script","//c.amazon-adsystem.com/aax2/apstag.js");</script><script async="" src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script><script>window.googletag = window.googletag || { cmd: [] };</script><meta content="width=device-width" name="viewport"/><meta charset="utf-8"/><link href="/favicon.ico" rel="favicon"/><meta content="initial-scale=1.0, width=device-width" name="viewport"/><meta content="Goodreads" property="og:title"/><meta content="website" property="og:type"/><meta content="https://s.gr-assets.com/assets/facebook/goodreads_wide-e23f6858b6bf20dcaf8493237a214a0e.png" property="og:image"/><meta content="https://www.goodreads.com/book/show/79550.The_Summer_Book" property="og:url"/><meta content="Goodreads" property="og:site_name"/><meta content="Discover and share books you love on Goodreads." property="og:description"/><meta content="5" name="next-head-count"/><link as="style" href="/_next/static/css/node_vendors~253ae210.5a142c8b.chunk.css" rel="preload"/><link data-n-g="" href="/_next/static/css/node_vendors~253ae210.5a142c8b.chunk.css" rel="stylesheet"/><link as="style" href="/_next/static/css/pages/book/show/%5Bbook_id%5D.31b7a621.chunk.css" rel="preload"/><link data-n-p="" href="/_next/static/css/pages/book/show/%5Bbook_id%5D.31b7a621.chunk.css" rel="stylesheet"/><noscript data-n-css=""></noscript><link as="script" href="/_next/static/chunks/main-5203f0731cb059a1ae11.js" rel="preload"/><link as="script" href="/_next/static/chunks/webpack-132aa4ebc4035b35ec5f.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~253ae210.9359ae64a50cada6ec2f.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~2a42e354.380b372e6a9224625307.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~15ae29a2.3979f2d906cdcf615eb1.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~f45575e3.e33e3220c7f23a7242a3.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~e097a484.e260ec1c8bfd8114a944.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~313ef737.0cc9da4d7ba84802c322.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~577b3ae9.da6a57a3ede1288bba54.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~4e60a0fb.db81b8cb513b8cc21d71.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~b1a98620.ac47f11f69a688700f8f.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~7274e1de.65c7b8076203f758b402.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~1f20a385.70e7e969a6e8582a27e5.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~70aabc29.d628571d0edd71ab6f37.js" rel="preload"/><link as="script" href="/_next/static/chunks/node_vendors~f9ca8911.feee87265e05daf4213e.js" rel="preload"/><link as="script" href="/_next/static/chunks/pages/_app-3edede47f10f01249186.js" rel="preload"/><link as="script" href="/_next/static/chunks/pages/book/show/%5Bbook_id%5D-3f527428a69a67c43c71.js" rel="preload"/></head><body><div id="__next"><header class="Header" data-auth="0" id="Header"><div class="SiteHeaderBanner"></div><div class="Header__contents"><button aria-label="Start Search" class="Header__toggleSearchContainer" type="button"><i class="Icon SearchIcon"><svg viewbox="0 0 24 24"><path d="M10.9942371,4 C14.8570476,4 17.9884742,7.1314266 17.9884742,10.9942371 C17.9884742,12.7320284 17.3547056,14.3217952 16.3056938,15.5450121 L19.6195637,18.858691 C19.8296728,19.0688002 19.8296728,19.4094545 19.6195637,19.6195637 C19.4094545,19.8296728 19.0688002,19.8296728 18.858691,19.6195637 L18.858691,19.6195637 L15.5450121,16.3056938 C14.3217952,17.3547056 12.7320284,17.9884742 10.9942371,17.9884742 C7.1314266,17.9884742 4,14.8570476 4,10.9942371 C4,7.1314266 7.1314266,4 10.9942371,4 Z M10.9942371,5.07603647 C7.72570514,5.07603647 5.07603647,7.72570514 5.07603647,10.9942371 C5.07603647,14.262769 7.72570514,16.9124377 10.9942371,16.9124377 C14.262769,16.9124377 16.9124377,14.262769 16.9124377,10.9942371 C16.9124377,7.72570514 14.262769,5.07603647 10.9942371,5.07603647 Z"></path></svg></i></button><a aria-label="Home" class="Header__logo" href="/?ref=nav_hom" tabindex="0"><svg class="GoodreadsWordmark" viewbox="0 0 673.8 144" xmlns="http://www.w3.org/2000/svg"><path d="m66.7 86.4h-0.3c-3.3 14.5-18.2 23-32.2 23-22.9 0-34.2-18.2-34.2-39.2 0-22 12.1-40.2 35.2-40.2 15.6 0 27.9 10.4 31.1 23.8h0.3v-21.9h3.2v79.3c0 22.3-12.8 32.8-34.1 32.8-16.6 0-30.8-7.5-31.3-25.8h3.2c0.6 16.3 13.1 22.6 27.9 22.6 19.8 0 31.1-9.4 31.1-29.7v-24.7zm-31.5-53.2c-21.2 0-32.1 17.1-32.1 37 0 20.3 10.8 36.1 30.8 36.1 21.1 0 32.6-16.3 32.6-36.1 0.2-18.9-10.7-37-31.3-37z" fill="#372213"></path><path d="m115.8 30c23.9 0 36.8 20.6 36.8 42.9 0 22.5-12.9 42.9-37 42.9-23.9 0-36.9-20.4-36.9-42.9 0.1-22.3 13-42.9 37.1-42.9zm0 82.6c21.8 0 33.6-19 33.6-39.7 0-20.4-11.8-39.7-33.6-39.7-22.2 0-33.8 19.3-33.8 39.7 0 20.7 11.6 39.7 33.8 39.7z" fill="#372213"></path><path d="m194.6 30c23.9 0 36.8 20.6 36.8 42.9 0 22.5-12.9 42.9-37 42.9-23.9 0-36.8-20.4-36.8-42.9 0-22.3 12.9-42.9 37-42.9zm0 82.6c21.9 0 33.6-19 33.6-39.7 0-20.4-11.8-39.7-33.6-39.7-22.2 0-33.8 19.3-33.8 39.7-0.1 20.7 11.6 39.7 33.8 39.7z" fill="#372213"></path><path d="m304.4 0h3.2v113.9h-3.2v-23h-0.3c-4.1 14.3-16.1 24.9-32.8 24.9-21.7 0-34.9-18-34.9-42.7 0-23 12.3-43.1 34.9-43.1 17.4 0 29 10.1 32.8 24.9h0.3v-54.9zm-33.1 33.2c-22.5 0-31.7 20.9-31.7 39.9 0 21 10.5 39.5 31.7 39.5 21.1 0 33.2-18.3 33.2-39.5-0.1-25.4-13.3-39.9-33.2-39.9z" fill="#372213"></path><path d="m323.1 31.6h9.2v19.3h0.3c5.1-13.2 16.3-21.1 31.1-20.4v10c-18.2-1-30.6 12.4-30.6 29.5v43.9h-10.1v-82.3z" fill="#372213"></path><path d="m372.4 75.4c0.1 14.7 7.8 32.4 27.1 32.4 14.7 0 22.6-8.6 25.8-21h10.1c-4.3 18.7-15.2 29.5-35.9 29.5-26.1 0-37.1-20.1-37.1-43.5 0-21.7 11-43.5 37.1-43.5 26.5 0 37 23.1 36.2 46.2h-63.3zm53.2-8.4c-0.5-15.1-9.9-29.4-26.2-29.4s-25.4 14.4-27 29.4h53.2z" fill="#372213"></path><path d="m444.3 56.8c0.9-19.3 14.5-27.6 33.3-27.6 14.5 0 30.3 4.5 30.3 26.5v43.7c0 3.8 1.9 6.1 5.9 6.1 1.1 0 2.4-0.3 3.2-0.6v8.4c-2.2 0.5-3.8 0.6-6.6 0.6-10.2 0-11.8-5.7-11.8-14.4h-0.3c-7 10.7-14.2 16.7-30 16.7-15.1 0-27.6-7.5-27.6-24.1 0-23.1 22.5-23.9 44.2-26.5 8.3-1 12.9-2.1 12.9-11.2 0-13.6-9.7-16.9-21.6-16.9-12.4 0-21.7 5.8-22 19.2h-9.9zm53.6 12.1h-0.3c-1.3 2.4-5.8 3.2-8.5 3.7-17.1 3-38.3 2.9-38.3 19 0 10.1 8.9 16.3 18.3 16.3 15.3 0 28.9-9.7 28.7-25.8v-13.2z" fill="#372213"></path><path d="m596.5 113.9h-9.2v-15.7h-0.3c-4.3 10.7-17.4 18-29.3 18-25.1 0-37-20.2-37-43.5s11.9-43.5 37-43.5c12.3 0 24.2 6.2 28.5 18h0.3v-47.2h10v113.9zm-38.9-6.1c21.4 0 28.9-18 28.9-35.1s-7.5-35.1-28.9-35.1c-19.1 0-27 18-27 35.1s7.8 35.1 27 35.1z" fill="#372213"></path><path d="m660.9 55.6c-0.5-12.4-10-18-21.5-18-8.9 0-19.4 3.5-19.4 14.2 0 8.9 10.2 12.1 17.1 13.9l13.4 3c11.5 1.8 23.4 8.5 23.4 22.8 0 17.9-17.7 24.7-33 24.7-19.1 0-32.2-8.9-33.8-29h10c0.8 13.5 10.9 20.6 24.3 20.6 9.4 0 22.5-4.1 22.5-15.6 0-9.6-8.9-12.7-18-15l-12.9-2.9c-13.1-3.5-23-8-23-22 0-16.7 16.4-23.1 30.9-23.1 16.4 0 29.5 8.6 30.1 26.5h-10.1z" fill="#372213"></path></svg></a><div class="Header__primaryNavContainer" data-testid="primaryNavContainer"><nav aria-label="Primary Navigation" class="HeaderPrimaryNav" role="navigation"><ul class="HeaderPrimaryNav__list"><li><a href="/?ref=nav_hom" tabindex="0">Home</a></li><li><a href="/review/list?ref=nav_mybooks" tabindex="0">My Books</a></li><li class="HeaderPrimaryNav__dropDown"><a aria-haspopup="true" href="#?ref=nav_brws" tabindex="0">Browse ▾</a><div class="HeaderNavDropdown HeaderNavDropdown--browse"><ul><li><a href="/recommendations?ref=nav_brws_recs" tabindex="0">Recommendations</a></li><li><a href="/choiceawards?ref=nav_brws_gca" tabindex="0">Choice Awards</a></li><li><a href="/giveaway?ref=nav_brws_giveaways" tabindex="0">Giveaways</a></li><li><a href="/new_releases?ref=nav_brws_newrels" tabindex="0">New Releases</a></li><li><a href="/list?ref=nav_brws_lists" tabindex="0">Lists</a></li><li><a href="/book?ref=nav_brws_explore" tabindex="0">Explore</a></li><li><a href="/news?ref=nav_brws_news" tabindex="0">News &amp; Interviews</a></li></ul><div class="Spotlight__loadingState"><div class="LoadingCard"><h3 class="Text H3">Loading...</h3><div class="Button__container"><button class="Button Button--primary Button--small Button--disabled" disabled="" type="button"><span class="Button__labelItem"><i class="Icon LoadingIcon"><svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12,4.5 C16.1421356,4.5 19.5,7.85786438 19.5,12 C19.5,16.1421356 16.1421356,19.5 12,19.5 C11.7238576,19.5 11.5,19.2761424 11.5,19 C11.5,18.7238576 11.7238576,18.5 12,18.5 C15.5898509,18.5 18.5,15.5898509 18.5,12 C18.5,8.41014913 15.5898509,5.5 12,5.5 C11.7238576,5.5 11.5,5.27614237 11.5,5 C11.5,4.72385763 11.7238576,4.5 12,4.5 Z M5.52355661,12.5744813 C5.58966824,13.3204488 5.78546239,14.0531384 6.10903452,14.7470411 C6.22573733,14.9973111 6.11745975,15.2948013 5.86718976,15.4115041 C5.61691978,15.5282069 5.31942955,15.4199293 5.20272674,15.1696593 C4.8298373,14.3699954 4.60380023,13.5241324 4.52746085,12.6627606 C4.50308319,12.3876964 4.70630482,12.1449507 4.98136906,12.1205731 C5.25643331,12.0961954 5.49917895,12.299417 5.52355661,12.5744813 Z M6.12910354,8.15473449 C6.37034463,8.28911211 6.4569746,8.59361124 6.32259698,8.83485234 C5.9995469,9.4148072 5.76629979,10.041192 5.63203591,10.6910042 C5.57615976,10.9614343 5.31163624,11.1353647 5.04120609,11.0794885 C4.77077594,11.0236124 4.59684555,10.7590889 4.6527217,10.4886587 C4.80759392,9.73910605 5.07653051,9.01687717 5.44898569,8.34822792 C5.58336331,8.10698683 5.88786244,8.02035686 6.12910354,8.15473449 Z M10.5511551,5.13333871 C10.6272703,5.3987838 10.473788,5.67567308 10.2083429,5.75178823 C9.13089659,6.060741 8.17228812,6.63067331 7.39899784,7.40679228 C7.2040925,7.60241058 6.88751054,7.60298855 6.69189224,7.40808321 C6.49627394,7.21317787 6.49569597,6.89659591 6.69060131,6.70097761 C7.58329166,5.8050218 8.69055678,5.14670697 9.93270558,4.79052654 C10.1981507,4.71441138 10.4750399,4.86789362 10.5511551,5.13333871 Z"><animatetransform attributename="transform" dur="0.6s" from="0 12 12" repeatcount="indefinite" to="360 12 12" type="rotate"></animatetransform></path></svg></i></span></button></div></div></div></div></li><li class="HeaderPrimaryNav__dropDown"><a aria-haspopup="true" href="#?ref=nav_comm" tabindex="0">Community ▾</a><div class="HeaderNavDropdown"><ul><li><a href="/group?ref=nav_comm_groups" tabindex="0">Groups</a></li><li><a href="/quotes?ref=nav_comm_quotes" tabindex="0">Quotes</a></li><li><a href="/ask_the_author?ref=nav_comm_askauthor" tabindex="0">Ask the Author</a></li><li><a href="/user/best_reviewers?ref=nav_comm_people" tabindex="0">People</a></li></ul></div></li></ul></nav></div><div class="Header__searchContainer"><section class="HeaderSearch" role="search"><div aria-live="assertive" class="u-sr-only" role="region"></div><form action="https://www.goodreads.com/search" method="get"><input aria-autocomplete="list" aria-controls="search-listbox" aria-expanded="false" aria-label="Search by book title or ISBN" class="HeaderSearch__input" name="q" placeholder="Search books" role="combobox" spellcheck="false" type="text" value=""/><input name="ref" type="hidden" value="nav_sb_noss_l"/><button aria-label="Search" class="HeaderSearch__button" type="submit" value=""><i class="Icon SearchIcon"><svg viewbox="0 0 24 24"><path d="M10.9942371,4 C14.8570476,4 17.9884742,7.1314266 17.9884742,10.9942371 C17.9884742,12.7320284 17.3547056,14.3217952 16.3056938,15.5450121 L19.6195637,18.858691 C19.8296728,19.0688002 19.8296728,19.4094545 19.6195637,19.6195637 C19.4094545,19.8296728 19.0688002,19.8296728 18.858691,19.6195637 L18.858691,19.6195637 L15.5450121,16.3056938 C14.3217952,17.3547056 12.7320284,17.9884742 10.9942371,17.9884742 C7.1314266,17.9884742 4,14.8570476 4,10.9942371 C4,7.1314266 7.1314266,4 10.9942371,4 Z M10.9942371,5.07603647 C7.72570514,5.07603647 5.07603647,7.72570514 5.07603647,10.9942371 C5.07603647,14.262769 7.72570514,16.9124377 10.9942371,16.9124377 C14.262769,16.9124377 16.9124377,14.262769 16.9124377,10.9942371 C16.9124377,7.72570514 14.262769,5.07603647 10.9942371,5.07603647 Z"></path></svg></i></button></form></section></div><nav aria-label="Sign in or Join" class="HeaderSecondaryNav"><ul class="HeaderSecondaryNav__list HeaderSecondaryNav__list--signedOut"><li><a href="/user/sign_in">Sign in</a></li><li><a href="/user/sign_up">Join</a></li></ul></nav></div></header><div class="PageFrame" data-testid="pageFrame"><main class="PageFrame__main"><svg aria-label="Loading interface..." preserveaspectratio="none" role="img" viewbox="0 0 404 300"><title>Loading interface...</title><rect clip-path="url(#4eta7ijm6m5)" height="300" style="fill:url(#xucls59dm78)" width="404" x="0" y="0"></rect><defs><clippath id="4eta7ijm6m5"><rect height="28" rx="0" ry="0" width="307" x="50" y="7"></rect><rect height="128" rx="0" ry="0" width="91" x="16" y="53"></rect><rect height="13" rx="0" ry="0" width="114" x="130" y="60"></rect><rect height="8" rx="0" ry="0" width="106" x="130" y="77"></rect><rect height="6" rx="0" ry="0" width="240" x="130" y="113"></rect><rect height="6" rx="0" ry="0" width="240" x="130" y="133"></rect><rect height="5" rx="0" ry="0" width="240" x="130" y="124"></rect><circle cx="269" cy="127" r="2"></circle><rect height="5" rx="0" ry="0" width="61" x="130" y="90"></rect><rect height="5" rx="0" ry="0" width="61" x="198" y="90"></rect><rect height="9" rx="0" ry="0" width="28" x="130" y="146"></rect><rect height="9" rx="0" ry="0" width="28" x="165" y="146"></rect><rect height="9" rx="0" ry="0" width="28" x="200" y="146"></rect><rect height="9" rx="0" ry="0" width="28" x="235" y="146"></rect><rect height="9" rx="0" ry="0" width="28" x="270" y="146"></rect><rect height="5" rx="0" ry="0" width="61" x="264" y="90"></rect></clippath><lineargradient id="xucls59dm78"><stop offset="0%" stop-color="#e0dcd3" stop-opacity="1"><animate attributename="offset" dur="1s" keytimes="0; 0.25; 1" repeatcount="indefinite" values="-2; -2; 1"></animate></stop><stop offset="50%" stop-color="#f5f4f1" stop-opacity="1"><animate attributename="offset" dur="1s" keytimes="0; 0.25; 1" repeatcount="indefinite" values="-1; -1; 2"></animate></stop><stop offset="100%" stop-color="#e0dcd3" stop-opacity="1"><animate attributename="offset" dur="1s" keytimes="0; 0.25; 1" repeatcount="indefinite" values="0; 0; 3"></animate></stop></lineargradient></defs></svg></main></div><footer class="Footer"><div class="Footer__contents"><div class="Footer__column"><h3 class="Footer__heading">Company</h3><ul class="Footer__list"><li><a href="/about/us">About us</a></li><li><a href="/jobs">Careers</a></li><li><a href="/about/terms">Terms</a></li><li><a href="/about/privacy">Privacy</a></li><li><a href="https://help.goodreads.com/s/article/Goodreads-Interest-Based-Ads-Notice">Interest Based Ads</a></li><li><a href="/adprefs">Ad Preferences</a></li><li><a href="/help?action_type=help_web_footer">Help</a></li></ul></div><div class="Footer__column"><h3 class="Footer__heading">Work With Us</h3><ul class="Footer__list"><li><a href="/author/program">Authors</a></li><li><a href="/advertisers">Advertise</a></li><li><a href="/news?content_type=author_blogs">Authors &amp; ads blog</a></li><li><a href="/api">API</a></li></ul></div><div class="Footer__column"><h3 class="Footer__heading">Connect</h3><ul class="Footer__list--inline"><li><a aria-label="Facebook" href="https://www.facebook.com/Goodreads/"><i class="Icon FacebookIcon"><svg viewbox="0 0 24 24"><path clip-rule="evenodd" d="M22 12C22 6.47715 17.5229 2 12 2C6.47715 2 2 6.47715 2 12C2 16.9913 5.65686 21.1283 10.4375 21.8785V14.8906H7.89844V12H10.4375V9.79688C10.4375 7.29063 11.9304 5.90625 14.2146 5.90625C15.3087 5.90625 16.4531 6.10156 16.4531 6.10156V8.5625H15.1921C13.9499 8.5625 13.5625 9.33334 13.5625 10.1242V12H16.3359L15.8926 14.8906H13.5625V21.8785C18.3431 21.1283 22 16.9913 22 12Z" fill-rule="evenodd"></path></svg></i></a></li><li><a aria-label="Twitter" href="https://twitter.com/goodreads"><i class="Icon TwitterIcon"><svg viewbox="0 0 24 24"><path d="M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM14.615 7.725C13.285 7.725 12.205 8.805 12.205 10.135C12.205 10.325 12.225 10.51 12.27 10.685C10.265 10.585 8.49 9.625 7.3 8.165C7.095 8.52 6.975 8.935 6.975 9.375C6.975 10.21 7.4 10.95 8.05 11.38C7.655 11.37 7.285 11.26 6.96 11.08V11.11C6.96 12.28 7.79 13.25 8.895 13.475C8.695 13.53 8.48 13.56 8.26 13.56C8.105 13.56 7.955 13.545 7.805 13.515C8.11 14.475 9 15.17 10.055 15.19C9.23 15.835 8.19 16.22 7.06 16.22C6.865 16.22 6.675 16.21 6.485 16.185C7.54 16.875 8.81 17.275 10.17 17.275C14.605 17.275 17.03 13.6 17.03 10.415C17.03 10.31 17.03 10.205 17.025 10.105C17.495 9.765 17.905 9.34 18.23 8.855C17.8 9.045 17.335 9.175 16.845 9.235C17.345 8.935 17.725 8.465 17.905 7.9C17.44 8.175 16.925 8.375 16.375 8.485C15.935 8.015 15.31 7.725 14.615 7.725Z"></path></svg></i></a></li><li><a aria-label="Instagram" href="https://www.instagram.com/goodreads/"><i class="Icon InstagramIcon"><svg viewbox="0 0 24 24"><path clip-rule="evenodd" d="M12 22C6.47733 22 2 17.5227 2 12C2 6.47733 6.47733 2 12 2C17.5227 2 22 6.47733 22 12C22 17.5227 17.5227 22 12 22ZM12 7.0764C13.6038 7.0764 13.7936 7.0828 14.4262 7.11163C15.0123 7.13805 15.3302 7.23654 15.5416 7.31821C15.8218 7.42711 16.022 7.55763 16.2326 7.76741C16.4424 7.978 16.5729 8.17818 16.681 8.45843C16.7635 8.66982 16.8619 8.98771 16.8884 9.57303C16.9172 10.2064 16.9236 10.3962 16.9236 12C16.9236 13.6038 16.9172 13.7936 16.8884 14.4262C16.8619 15.0123 16.7635 15.3302 16.6818 15.5416C16.5729 15.8218 16.4424 16.022 16.2326 16.2326C16.0386 16.4318 15.8025 16.585 15.5416 16.681C15.3302 16.7635 15.0123 16.8619 14.427 16.8884C13.7936 16.9172 13.6038 16.9236 12 16.9236C10.3962 16.9236 10.2064 16.9172 9.57383 16.8884C8.98771 16.8619 8.66982 16.7635 8.45843 16.6818C8.17818 16.5729 7.978 16.4424 7.76741 16.2326C7.5682 16.0386 7.41498 15.8025 7.31901 15.5416C7.23654 15.3302 7.13805 15.0123 7.11163 14.427C7.0828 13.7936 7.0764 13.6038 7.0764 12C7.0764 10.3962 7.0828 10.2064 7.11163 9.57383C7.13805 8.98771 7.23654 8.66982 7.31821 8.45843C7.42711 8.17818 7.55763 7.978 7.76741 7.76741C7.978 7.55763 8.17818 7.42711 8.45843 7.31901C8.66982 7.23654 8.98771 7.13805 9.57303 7.11163C10.2064 7.0828 10.3962 7.0764 12 7.0764ZM12 5.99463C10.3689 5.99463 10.1648 6.00184 9.52419 6.03066C8.88441 6.06029 8.44802 6.16118 8.06688 6.31011C7.66571 6.46071 7.30227 6.69709 7.00193 7.00273C6.69677 7.30268 6.46069 7.66556 6.31011 8.06608C6.16118 8.44802 6.06029 8.88441 6.03066 9.52339C6.00184 10.164 5.99463 10.3689 5.99463 12C5.99463 13.6311 6.00184 13.8352 6.03066 14.4758C6.06029 15.1156 6.16118 15.552 6.31011 15.9331C6.46305 16.3287 6.66883 16.6634 7.00273 16.9981C7.33663 17.3312 7.67133 17.537 8.06608 17.6899C8.44802 17.8388 8.88441 17.9397 9.52339 17.9693C10.164 17.9982 10.3689 18.0054 12 18.0054C13.6311 18.0054 13.8352 17.9982 14.4758 17.9693C15.1156 17.9397 15.552 17.8388 15.9331 17.6899C16.3343 17.5393 16.6977 17.3029 16.9981 16.9973C17.3312 16.6634 17.537 16.3287 17.6899 15.9339C17.8388 15.552 17.9397 15.1156 17.9693 14.4766C17.9982 13.836 18.0054 13.6311 18.0054 12C18.0054 10.3689 17.9982 10.1648 17.9693 9.52419C17.9397 8.88441 17.8388 8.44802 17.6899 8.06688C17.5393 7.66571 17.3029 7.30227 16.9973 7.00193C16.6973 6.69677 16.3344 6.46069 15.9339 6.31011C15.552 6.16118 15.1156 6.06029 14.4766 6.03066C13.836 6.00184 13.6311 5.99463 12 5.99463ZM12.012 8.92525C10.3072 8.92525 8.92525 10.3072 8.92525 12.012C8.92525 13.7168 10.3072 15.0988 12.012 15.0988C13.7168 15.0988 15.0988 13.7168 15.0988 12.012C15.0988 10.3072 13.7168 8.92525 12.012 8.92525ZM12.012 14.0154C10.9056 14.0154 10.0086 13.1185 10.0086 12.012C10.0086 10.9056 10.9056 10.0086 12.012 10.0086C13.1185 10.0086 14.0154 10.9056 14.0154 12.012C14.0154 13.1185 13.1185 14.0154 12.012 14.0154ZM15.9083 8.78272C15.9083 8.38782 15.5882 8.06768 15.1933 8.06768C14.7984 8.06768 14.4782 8.38782 14.4782 8.78272C14.4782 9.17763 14.7984 9.49776 15.1933 9.49776C15.5882 9.49776 15.9083 9.17763 15.9083 8.78272Z" fill-rule="evenodd"></path></svg></i></a></li><li><a aria-label="LinkedIn" href="https://www.linkedin.com/company/goodreads-com/"><i class="Icon LinkedinIcon"><svg viewbox="0 0 24 24"><path clip-rule="evenodd" d="M12 22C6.47733 22 2 17.5227 2 12C2 6.47733 6.47733 2 12 2C17.5227 2 22 6.47733 22 12C22 17.5227 17.5227 22 12 22ZM7.684 10.3693V16.5447H9.456V10.3693H7.684ZM8.524 9.59733C9.19067 9.59733 9.60533 9.12333 9.60533 8.52533C9.592 7.916 9.19067 7.45467 8.53667 7.45467C7.88267 7.45467 7.45467 7.91733 7.45467 8.52733C7.45467 9.12533 7.87067 9.59733 8.512 9.59733H8.52467H8.524ZM16.5453 16.5453V13.1113C16.5453 11.1993 15.556 10.31 14.2967 10.31C13.282 10.31 12.646 10.9153 12.528 11.3387V10.3693H10.5373C10.5633 10.884 10.5373 16.5453 10.5373 16.5453H12.528V13.204C12.528 13.0173 12.52 12.832 12.5713 12.6993C12.708 12.3273 13.002 11.9427 13.5313 11.9427C14.222 11.9427 14.536 12.5127 14.536 13.3493V16.5453H16.5453Z" fill-rule="evenodd"></path></svg></i></a></li></ul></div><div class="Footer__right"><a class="Footer__badge" href="https://itunes.apple.com/app/apple-store/id355833469?pt=325668&amp;ct=mw_footer&amp;mt=8"><img alt="Download app for iOS" height="40" src="https://d15be2nos83ntc.cloudfront.net/images/badge-apple_app_store@2x.png" width="135"/></a><a class="Footer__badge" href="https://play.google.com/store/apps/details?id=com.goodreads&amp;utm_source=mw_footer&amp;pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1"><img alt="Download app for Android" height="40" src="https://d15be2nos83ntc.cloudfront.net/images/badge-google_play_store@2x.png" width="135"/></a><p class="Footer__copy">© <!-- -->2023<!-- --> Goodreads, Inc.</p></div></div></footer></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"apolloState":{},"apolloClient":null,"authContextParams":{"signedIn":false,"customerId":null,"legacyCustomerId":null,"role":"user"},"userAgentContextParams":{},"userAgent":"Python-urllib/3.9"}},"page":"/book/show/[book_id]","query":{"book_id":"79550.The_Summer_Book"},"buildId":"XyhL6FcLlDOUaAAO_x-IP","runtimeConfig":{"env":"Production"},"isFallback":false,"customServer":true,"gip":true,"locales":["en","ab","aa","af","ak","sq","am","ar","an","hy","as","av","ae","ay","az","bm","ba","eu","be","bn","bh","bi","bs","br","bg","my","ca","ch","ce","ceb","ny","zh","zh-TW","cv","kw","co","cr","hr","cs","da","dv","nl","eo","et","ee","fo","fj","fi","fr","ff","gl","ka","de","el","gn","gu","ht","ha","he","hz","hi","ho","hu","ia","id","ie","ilo","ga","ig","ik","io","is","it","iu","ja","jv","kl","kn","kr","ks","kk","km","ki","rw","ky","kv","kg","ko","ku","kj","la","lb","lg","li","ln","lo","lt","lu","lv","gv","mk","mg","ms","ml","mt","mi","mr","mh","mn","na","nv","nb","nd","ne","new","ng","nn","no","ii","nr","oc","oj","cu","om","or","os","pa","pi","fa","pl","ps","pt","qu","rm","rn","ro","ru","sa","sc","sd","se","sm","sg","sr","gd","sn","si","sk","sl","so","st","es","su","sw","ss","sv","ta","te","tg","th","ti","bo","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","cy","wo","fy","xh","yi","yo","za"]}</script><script nomodule="" src="/_next/static/chunks/polyfills-3c83d3e8d62bc1754e3c.js"></script><script async="" src="/_next/static/chunks/main-5203f0731cb059a1ae11.js"></script><script async="" src="/_next/static/chunks/webpack-132aa4ebc4035b35ec5f.js"></script><script async="" src="/_next/static/chunks/node_vendors~253ae210.9359ae64a50cada6ec2f.js"></script><script async="" src="/_next/static/chunks/node_vendors~2a42e354.380b372e6a9224625307.js"></script><script async="" src="/_next/static/chunks/node_vendors~15ae29a2.3979f2d906cdcf615eb1.js"></script><script async="" src="/_next/static/chunks/node_vendors~f45575e3.e33e3220c7f23a7242a3.js"></script><script async="" src="/_next/static/chunks/node_vendors~e097a484.e260ec1c8bfd8114a944.js"></script><script async="" src="/_next/static/chunks/node_vendors~313ef737.0cc9da4d7ba84802c322.js"></script><script async="" src="/_next/static/chunks/node_vendors~577b3ae9.da6a57a3ede1288bba54.js"></script><script async="" src="/_next/static/chunks/node_vendors~4e60a0fb.db81b8cb513b8cc21d71.js"></script><script async="" src="/_next/static/chunks/node_vendors~b1a98620.ac47f11f69a688700f8f.js"></script><script async="" src="/_next/static/chunks/node_vendors~7274e1de.65c7b8076203f758b402.js"></script><script async="" src="/_next/static/chunks/node_vendors~1f20a385.70e7e969a6e8582a27e5.js"></script><script async="" src="/_next/static/chunks/node_vendors~70aabc29.d628571d0edd71ab6f37.js"></script><script async="" src="/_next/static/chunks/node_vendors~f9ca8911.feee87265e05daf4213e.js"></script><script async="" src="/_next/static/chunks/pages/_app-3edede47f10f01249186.js"></script><script async="" src="/_next/static/chunks/pages/book/show/%5Bbook_id%5D-3f527428a69a67c43c71.js"></script><script async="" src="/_next/static/XyhL6FcLlDOUaAAO_x-IP/_buildManifest.js"></script><script async="" src="/_next/static/XyhL6FcLlDOUaAAO_x-IP/_ssgManifest.js"></script><div><!-- This is a random-length HTML comment: dpEaXYl00fM6l%#3nPZj#qhHSm]CU$i#EDMXsWO1Us^U@]VIBzXEy[#[yRa64MnEOB!4BGgnoTPY0wWKaiFHII(1kJBIlSM*JcQzQRuKrX8qbF$BYs]xKtIK#sfoIBbM@Ec7Ij![Q]L^U#(4A6@e8Tr49MEu*(T0UiH9xL46113&$aMIp^LQHpHUO^0dQ]mX1GY!FLeD^gcnVjG1IjwhuQ$PtP!Xx#i^2A02nggA7&ebzLc2kM90MEJBmZQEHhTwwgNhr6#DsCmRz*mgO^iVjaXHkwkfQiF$XPfD&NcBFYxv)OVTb!sbu]gf8s1qxt6@6th!J3v*k#&#dapv]x5PZlrz7TF7xzgYDv0VQ$hwZwvZxis[9FzagyTrO4iiMCv(u$*^Ey&e)hHogqXPk^Lm&mFv]S]TCmfYnsx[79vk3KGsY04o7CqUJ&FYVK20[7RoeTn&C45r7S52771w]Ic7&Df%aGNVW)uEZx9V$y7Oy#]$81rlHEEPFZiJ*eQ[3C#RX56@8hcfRJJ7SnmLu#[j1pyFf(B59RFYeZ6jh#O@d*^ --></div></body></html>

Hi Ken!

As already mentioned, the site has changed a lot and the scraper code is now outdated. However, most of it can still be modified to work. For example, you can get the book title by changing to: 'book_title': ' '.join(soup.find('h1', {'data-testid': 'bookTitle'}).text.split()), # Changed from 'id' to 'data-testid'

benh4ckett commented 1 year ago

For what it's worth, I put up https://github.com/maria-antoniak/goodreads-scraper/pull/40 . It isn't perfect, it hasn't fixed everything, but I'm hoping it is a half decent start.

Bobamith commented 1 year ago

Does anybody know how to get the genres now?

benh4ckett commented 1 year ago

@Bobamith Sorry I've been busy, I meant to reply. I don't know offhand, maybe this weekend or next I can look into it if that would help you. Though, if you're a programmer, and you have free time, learning python and BeautifulSoup might not be a terrible idea.

Bobamith commented 1 year ago

@benhackett4 I’m far from a programmer. 😆 It’s not that important, so it’s up to you if you want to look into it. Thanks for replying either way!