This Python script fetches new job postings from one or more RSS feeds on Upwork and sends notifications to a Telegram chat with relevant job details.
-
Clone the repository to your local machine.
-
Install the required libraries (
feedparser
,requests
,tzlocal
, andbs4
) using pip. -
Rename the
config-sample.json
file toconfig.json
and update the contents with your own values.The
config.json
file contains the following settings:tgBotToken
: Your Telegram bot token.chat_id
: The chat ID of the Telegram chat to send notifications to.feed_url
: A list of URLs for the Upwork RSS feeds to monitor.
-
Run the script using python
upwork_job_feed_notifier.py
.
The config.json
file contains the following settings:
-
tgBotToken
: Your Telegram bot token.How to get Telegram bot token
- Open Telegram and search for the "BotFather" bot.
- Start a chat with the BotFather by clicking on the "Start" button.
- Type
/newbot
and follow the instructions to create a new bot. - Choose a name for your bot and a username that ends with "bot".
- BotFather will provide you with a unique Token for your bot.
- Save the Token in a safe place, as you will need it to communicate with your bot.
-
chat_id
: The chat ID of the Telegram chat to send notifications to.How to get chat ID
- Start a chat with your bot.
- Send any message to your bot.
- Open the following URL in your browser, replacing YOUR_BOT_TOKEN with the actual token for your bot:
https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates
- Look for the
"chat":{"id":
value in the response. This is your chat ID.
-
feed_url
: A list of URLs for the Upwork RSS feeds to monitor.How to feed URL
- Log in to your Upwork account.
- Click on the "Find Work" tab in the top navigation menu.
- Select the category you're interested in, and then select the subcategory.
- Click on the "RSS" icon on the right side of the page.
- Copy the URL in your browser's address bar. This is the RSS feed URL for that category/subcategory.
- Open your terminal and type crontab -e to open the crontab file in your default editor.
- Add a new line to the crontab file to specify when you want the script to run. For example, if you want the script to run every hour at minute 50, add the following line:
Replace /path/to/script.py with the actual path to your script file.
50 * * * * /usr/bin/python3 /path/to/script/upwork_job_feed_notifier.py
- Save and close the crontab file.
- The cron daemon will automatically start the script at the specified time. You can check the system log to verify that the script is running by typing
tail -f /var/log/syslog
in your terminal. If you see a message that saysCRON[xxx]: (username) CMD (/usr/bin/python3 /path/to/script/upwork_job_feed_notifier.py)
, it means the script is running.