Skip to content

Instantly share code, notes, and snippets.

@plantvsbirds
Last active January 5, 2023 09:17
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plantvsbirds/526c4bf5a50c74e97c412e422196defa to your computer and use it in GitHub Desktop.
Save plantvsbirds/526c4bf5a50c74e97c412e422196defa to your computer and use it in GitHub Desktop.
download your copy of epub/mobi of caltech fenman lecture on physics vol i http://www.feynmanlectures.caltech.edu/I_toc.html, powered by https://github.com/lepture/getbook/
{
"uid": "feynman-lecture-vol-i",
"title": "The Feynman Lectures on Physics, Volume I",
"author": "Richard Feynman",
"chapters": ["http://www.feynmanlectures.caltech.edu/I_89.html","http://www.feynmanlectures.caltech.edu/I_90.html","http://www.feynmanlectures.caltech.edu/I_91.html","http://www.feynmanlectures.caltech.edu/I_92.html","http://www.feynmanlectures.caltech.edu/I_01.html","http://www.feynmanlectures.caltech.edu/I_02.html","http://www.feynmanlectures.caltech.edu/I_03.html","http://www.feynmanlectures.caltech.edu/I_04.html","http://www.feynmanlectures.caltech.edu/I_05.html","http://www.feynmanlectures.caltech.edu/I_06.html","http://www.feynmanlectures.caltech.edu/I_07.html","http://www.feynmanlectures.caltech.edu/I_08.html","http://www.feynmanlectures.caltech.edu/I_09.html","http://www.feynmanlectures.caltech.edu/I_10.html","http://www.feynmanlectures.caltech.edu/I_11.html","http://www.feynmanlectures.caltech.edu/I_12.html","http://www.feynmanlectures.caltech.edu/I_13.html","http://www.feynmanlectures.caltech.edu/I_14.html","http://www.feynmanlectures.caltech.edu/I_15.html","http://www.feynmanlectures.caltech.edu/I_16.html","http://www.feynmanlectures.caltech.edu/I_17.html","http://www.feynmanlectures.caltech.edu/I_18.html","http://www.feynmanlectures.caltech.edu/I_19.html","http://www.feynmanlectures.caltech.edu/I_20.html","http://www.feynmanlectures.caltech.edu/I_21.html","http://www.feynmanlectures.caltech.edu/I_22.html","http://www.feynmanlectures.caltech.edu/I_23.html","http://www.feynmanlectures.caltech.edu/I_24.html","http://www.feynmanlectures.caltech.edu/I_25.html","http://www.feynmanlectures.caltech.edu/I_26.html","http://www.feynmanlectures.caltech.edu/I_27.html","http://www.feynmanlectures.caltech.edu/I_28.html","http://www.feynmanlectures.caltech.edu/I_29.html","http://www.feynmanlectures.caltech.edu/I_30.html","http://www.feynmanlectures.caltech.edu/I_31.html","http://www.feynmanlectures.caltech.edu/I_32.html","http://www.feynmanlectures.caltech.edu/I_33.html","http://www.feynmanlectures.caltech.edu/I_34.html","http://www.feynmanlectures.caltech.edu/I_35.html","http://www.feynmanlectures.caltech.edu/I_36.html","http://www.feynmanlectures.caltech.edu/I_37.html","http://www.feynmanlectures.caltech.edu/I_38.html","http://www.feynmanlectures.caltech.edu/I_39.html","http://www.feynmanlectures.caltech.edu/I_40.html","http://www.feynmanlectures.caltech.edu/I_41.html","http://www.feynmanlectures.caltech.edu/I_42.html","http://www.feynmanlectures.caltech.edu/I_43.html","http://www.feynmanlectures.caltech.edu/I_44.html","http://www.feynmanlectures.caltech.edu/I_45.html","http://www.feynmanlectures.caltech.edu/I_46.html","http://www.feynmanlectures.caltech.edu/I_47.html","http://www.feynmanlectures.caltech.edu/I_48.html","http://www.feynmanlectures.caltech.edu/I_49.html","http://www.feynmanlectures.caltech.edu/I_50.html","http://www.feynmanlectures.caltech.edu/I_51.html","http://www.feynmanlectures.caltech.edu/I_52.html"]
}
Goto = (vol,chap,sec) => {
var volstrings =["I","II","III"];
var dest;
var chapstr = "0"+String(chap);
chapstr = chapstr.substr(chapstr.length-2);
dest = volstrings[vol-1] + "_" + chapstr + ".html"
if(typeof(sec)!=='undefined') {
dest += "#Ch" + String(chap) + "-S" + String(sec);
}
return (dest);
}
$('a.chapterlink').toArray().map(a => 'http://www.feynmanlectures.caltech.edu' + eval(a.href.split(':')[1]))
@plantvsbirds
Copy link
Author

plantvsbirds commented Oct 22, 2019 via email

@hojnrq
Copy link

hojnrq commented Oct 22, 2019

likely upstream (getbook) issue

I doubt it, given the getbook code hasn't changed in more than one year (yet someone above reported it works, apparently).

Could you try it yourself right now to see if it works? If it does work, can you please report the exact versions of your python and following packages:

Jinja2
MarkupSafe
Pillow
beautifulsoup4
certifi
chardet
getbook
html5lib
idna
lxml
python-dateutil
requests
six
soupsieve
urllib3
webencodings

@emaland
Copy link

emaland commented Jun 30, 2021

For anyone who comes across this thread (as I just did), to fix this just:

pip install beautifulsoup4==4.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment