I've written a script that uploads files to Youtube via googlecl. It
works perfectly. The first time I ran it, I got the "Please log in and/
or grant access via
your browser at https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=..."
notice. Of course, I visited this link in lynx and granted access to
my machine and all is well.
The whole idea behind this script is to run as a cron job at night.
When it runs as a cron job, it wants me to grant access again, even
though it is running on the same machine, under the same user, with
the same conditions. I tried copy-pasting the URL into a browser, and
google seems happy with my access-granting, but when the script runs
again it asks me to grant access again with a different token.
I'm about at wit's end... Is there any way to store authorization
tokens or bypass this process? I obviously can't log into Google every
time cron runs this script... Any ideas?
Here is how I am calling googlecl in my script:
/share/HDA_DATA/.qpkg/Python/bin/google youtube post $f --user
"us...@gmail.com" --devkey "$devkey" --category "$category" --owner
"ytuser" --summary "$desc" >> $p"log.txt"
I'm running this on a QNAP NAS, though I doubt that's relevant...
Thanks for your help!
Brad
# cat /etc/crontab$ cat /etc/crontabSHELL=/bin/bashPATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/binMAILTO=rootHOME=/# run-parts01 * * * * root run-parts /etc/cron.hourly02 4 * * * root run-parts /etc/cron.daily22 4 * * 0 root run-parts /etc/cron.weekly42 4 1 * * root run-parts /etc/cron.monthly5 * * * * root /usr/local/bin/google-contacts.sh
ln -s /root/.config/ /
ln -s /root/.local/ /