Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gov-il-rss-telegram

העברת עדכוני RSS מאתר הממשלה (gov.il) לצ'אט טלגרם באמצעות GitHub Actions.

רוב קוראי ה-RSS לא עובדים עם ערוצי RSS של gov.il

אתר gov.il מוגן על ידי מערכת ההגנה של Cloudflare, שמשתמשת ב-TLS fingerprinting כדי לחסום לקוחות HTTP שאינם דפדפנים. כלים סטנדרטיים כמו curl, wget, Python requests ורוב קוראי ה-RSS מקבלים שגיאת 403. זוהי בעיה ידועה שמשפיעה על קוראי RSS רבים מול אתרים המוגנים על ידי Cloudflare.

הפרויקט הזה עוקף את החסימה באמצעות curl-impersonate (דרך curl_cffi) שמחקה את חתימת ה-TLS של דפדפן Chrome. למרות שהפרויקט נבנה עבור gov.il, הוא יכול לעבוד עם כל ערוץ RSS שמוגן על ידי Cloudflare.

Setup

1. Fork this repository

2. Create a Telegram bot

  1. Message @BotFather on Telegram
  2. Send /newbot and follow the prompts
  3. Copy the bot token you receive
  4. Add the bot to your target chat/group
  5. To get the chat ID, send a message in the chat, then visit:
    https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates
    
    Look for "chat":{"id":...} in the response.

3. איתור כתובות RSS

לכל משרד ממשלתי יש דף RSS בכתובת:

https://www.gov.il/he/departments/<שם-המשרד>/RSS

לדוגמה:

רשימת כל המשרדים זמינה בכתובת https://www.gov.il/he/departments/ — הוסיפו /RSS לכתובת של כל משרד כדי לראות את הערוצים הזמינים.

כל דף RSS מציג ערוצי תוכן (פרסומים, חדשות, שירותים, התראות ועוד). דוגמאות לערוצים ממשרדים שונים:

לחצו קליק ימני על שם הערוץ בדף ה-RSS של המשרד והעתיקו את כתובת הקישור.

ערוצי RSS פעילים

נמצאו 347 ערוצי RSS פעילים ב-97 גופים ממשלתיים. הרשימה המלאה זמינה בקובץ FEEDS.md.

4. Configure repository secrets

Go to your fork's Settings > Secrets and variables > Actions and add:

Secret Value
TELEGRAM_BOT_TOKEN Your bot token from BotFather
TELEGRAM_CHAT_ID The target chat/group ID
RSS_URLS Space-separated list of RSS feed URLs

Example RSS_URLS value:

https://www.gov.il/he/api/PublicationApi/rss/104cb0f4-d65a-4692-b590-94af928c19c0 https://www.gov.il/he/api/NewsApi/rss/104cb0f4-d65a-4692-b590-94af928c19c0

5. Enable the workflow

Go to the Actions tab in your fork and enable workflows. The feed check runs every 6 hours by default. You can also trigger it manually via "Run workflow".

How it works

  1. GitHub Actions runs on a cron schedule
  2. The script fetches each RSS feed using curl_cffi with Chrome TLS impersonation
  3. New items are detected by comparing GUIDs against a cached list
  4. New items are sent to Telegram with title, description, and link
  5. Sent GUIDs are cached between runs to avoid duplicates

Customization

To change the check frequency, edit the cron expression in .github/workflows/gov-il-rss.yml:

schedule:
  - cron: '0 */6 * * *'  # Every 6 hours

About

Forward gov.il RSS feed updates to Telegram via GitHub Actions

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages