pull/32/head
Dave Mateer 2022-04-23 14:44:21 +01:00
rodzic bfe6145159
commit 9ef61eec59
4 zmienionych plików z 11 dodań i 6 usunięć

Wyświetl plik

@ -17,7 +17,6 @@ class YoutubeDLArchiver(Archiver):
self.fb_cookie = fb_cookie
def download(self, url, check_if_exists=False):
logger.debug(f'fb cookie is {self.fb_cookie}')
netloc = self.get_netloc(url)
# DM to set env variable: export FB_COOKIE="paste"
# this gets blanked at the end of each session ie when vs code closes

Wyświetl plik

@ -192,3 +192,4 @@ def main():
if __name__ == '__main__':
main()
logger.success("finished")

Wyświetl plik

@ -20,8 +20,7 @@ cd /home/dave/auto-archiver
# do I need this?
PATH=/usr/local/bin:$PATH
# NOTE I'm getting a warning running this command.
# /usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py:123: PkgResourcesDeprecationWarning: 0.23ubuntu1 is an invalid version and will not be supported in a future release
pipenv run python auto_archive.py --sheet "Test Hashing" >> /home/dave/log.txt 2>&1

Wyświetl plik

@ -74,15 +74,21 @@ rm geckodriver*
# so the cron job can execute the shell script (running as user dave)
sudo chmod +x ~/auto-archiver/infra/cron.sh
# to stop errors
# https://askubuntu.com/questions/1383506/deprecation-warnings-python3-8-packages
#/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py:123: PkgResourcesDeprecationWarning: 0.23ubuntu1 is an invalid version and will not be supported in a future release
sudo mv /usr/local/lib/python3.8/dist-packages/pkg_resources pkg_resources_back
# runs the script every minute
cat <<EOT >> run-auto-archive
* * * * * dave /home/dave/auto-archiver/infra/cron.sh
EOT
sudo mv auto /etc/cron.d
sudo mv run-auto-archive /etc/cron.d
sudo chown root /etc/cron.d/auto
sudo chmod 600 /etc/cron.d/auto
sudo chown root /etc/cron.d/run-auto-archive
sudo chmod 600 /etc/cron.d/run-auto-archive
# MONITORING
# syslog in /var/log/syslog