GithubHelp home page GithubHelp logo

owulveryck / repocketable Goto Github PK

View Code? Open in Web Editor NEW
53.0 4.0 4.0 336 KB

Tool to fetch articles from (getPocket|the web) and turn them into epub

License: MIT License

Go 100.00%
readability getpocket epub epub-generation hacktoberfest2021 hacktoberfest

repocketable's Issues

Create an option to pass custom headers to the downloader

Tying to grab the Feynman lectures (eg https://www.feynmanlectures.caltech.edu/I_01.html) leads to a 403.

The webserver requires custom headers; for example this request is ok:

curl -I https://www.feynmanlectures.caltech.edu/I_01.html \
>   -H 'sec-ch-ua: "Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"' \
  -H 'Referer: https://www.feynmanlectures.caltech.edu/I_01.html' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36' \
  -H 'Range: bytes=294912-' \
  -H 'sec-ch-ua-platform: "macOS"' \
  --compressed

I think about changing the NewDownloader function to take ... string as argument.

We may create a custon roundtripper that sets the header automatically:

type customTransport struct {
	*http.Transport
}

func (c *customTransport) RoundTrip(req *http.Request) (*http.Response, error) {
	req.Header.Set("blabla", "blabla")
	return c.Transport.RoundTrip(req)
}

problem with substack articles

Hi,

as per subject.
I have just installed the current version of repocketable on Ubuntu 22.04LTS.

the toEpub binary works with other website, but if I try to run e.g.:

#> ./toEpub https://danafblankenhorn.substack.com/p/the-hinge-point

all I get is this error message, and no ePUB file is created:
2024/04/18 11:08:00 Cannot fill document: bad sethttps://substackcdn.com/image/fetch/w_424

what does this exactly mean, and can it be fixed on repocketable's side?

Thanks,
M.

Kindle support

Hello,
I found your post and this project on Hacker news and I love it!

While I've unfortunately not the bandwidth to contribute myself, I wanted to suggest an idea that may increase adoption: Kindle support.

It would means 2 distinct features:

  • convert the epub to .mobi
  • optionally, send the generated .mobi to the email address associated to the kindle

PS: Your link Archive in the navbar of your site does not work: https://blog.owulveryck.info/post/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.