thp / urlwatch

Watch (parts of) webpages and get notified when something changes via e-mail, on your phone or via other means. Highly configurable.
https://thp.io/2008/urlwatch/
Other
2.81k stars 352 forks source link

How to use environment variables in URLs? #701

Open throwaway29345 opened 2 years ago

throwaway29345 commented 2 years ago

I have a question on using environment variables in side a job.

name: "my job"
url: https://mysite.org?api_key=${env variable}
filter:
  - some filter...

Is this possible today?

thp commented 2 years ago

Not directly, but you can probably use a shell job using e.g. curl to work around it for now:

name: "my job"
command: curl http://google.com/?q=$SOMETHING
filter:
 - ...

Then run urlwatch using e.g.:

SOMETHING=asdf ./urlwatch