AndyTheFactory / newspaper4k

📰 Newspaper4k a fork of the beloved Newspaper3k. Extraction of articles, titles, and metadata from news websites.
MIT License
429 stars 37 forks source link

Configurable base .news-scraper path #141

Open AndyTheFactory opened 10 months ago

AndyTheFactory commented 10 months ago

Issue by KillerCodeMonkey Wed Oct 18 10:27:01 2017 Originally opened as https://github.com/codelucas/newspaper/issues/462


I am executing newspaper3k on amazon aws lambda.

There you are only allowed to create folders and writefiles to the /tmp folder.

@codelucas Maybe it is possible to make the base of the TOP_DIRECTORY path in the settings.py configurable, like adding an ENV-Variable?

AndyTheFactory commented 10 months ago

Comment by codelucas Sun Oct 22 02:25:33 2017


Yea that is possible. We actually used to not write to /tmp and write to the ~ homedir but that was changed recently due to more of our users having permissions problems. We can make this configurable.

U know the ideal solution to minimize user hassle would be to have an exception handler in the tmp directory creation step! If we catch some sort of a permissions error we can just attempt to write to either /tmp or ~ accordingly.

But we should also have a configurable path in settings.py like you said

AndyTheFactory commented 10 months ago

Comment by ekingery Thu Aug 16 22:03:39 2018


Issue #384 is related and could be a helpful reference for anyone stuck on this issue.