Answer the question
In order to leave comments, you need to log in
How to deploy Python script with .txt file to Heroku?
I have a parser script. The parser with an interval, for example, an hour, parses the site, collects links and uploads them to a .txt file. The next time it checks the site links with the .txt file and if there are new links, it fills them in .txt
postsFile = open('posts.txt','r+')
posts = postsFile.read().splitlines()
postsFile.writelines(url+'\n')
postsFile.close()
Answer the question
In order to leave comments, you need to log in
There is no file system on Heroku. Store the collected data somewhere outside of Heroku.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question