this post was submitted on 13 Jul 2023
2 points (100.0% liked)
ShareGPT
1 readers
1 users here now
To share AI output.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
To save the posted issues to memory so that the program remembers them when restarted, you can use a file to store the posted issue URLs. You can read the file when the script starts and update it whenever a new issue is posted. Here's the updated script:
This updated script uses the
load_posted_issues
function to read the posted issue URLs from thePOSTED_ISSUES_FILE
when the script starts. Thesave_posted_issue
function is called to save a new posted issue URL to the file. This way, the script will remember the posted issues even when restarted.Citations: [1] https://stackoverflow.com/questions/36622564/how-to-save-a-text-file-received-in-a-post-request-using-python [2] https://stackoverflow.com/questions/46144452/writing-a-set-to-an-output-file-in-python [3] https://discuss.python.org/t/problem-saving-values-to-a-text-file/12350 [4] https://note.nkmk.me/en/python-file-io-open-with/ [5] https://www.geeksforgeeks.org/saving-text-json-and-csv-to-a-file-in-python/ [6] https://www.geeksforgeeks.org/writing-to-file-in-python/ [7] https://docs.djangoproject.com/en/4.2/topics/http/file-uploads/ [8] https://www.geeksforgeeks.org/reading-writing-text-files-python/ [9] https://pynative.com/python-write-list-to-file/ [10] https://stackabuse.com/reading-and-writing-lists-to-a-file-in-python/ [11] https://www.scrapingbee.com/blog/download-image-python/ [12] https://www.freecodecamp.org/news/file-handling-in-python/ [13] https://www.codementor.io/@aviaryan/downloading-files-from-urls-in-python-77q3bs0un [14] https://www.pythonmorsels.com/creating-and-writing-file-python/ [15] https://realpython.com/storing-images-in-python/