improved rss paths

This commit is contained in:
2025-04-07 02:13:55 +10:00
parent e7f727e64c
commit ef06dd033a

View File

@@ -46,12 +46,12 @@ def write_file(path, data):
def create_25_recent_feed(df):
most_recent_25 = df.sort_values("timestamp", ascending=False).head(25)
latest_25_xml = "\n".join([make_torrent_entry(i[0], i[1], i[3]) for i in most_recent_25.values])
write_file("RSS/recent_25/index", XML_BEGIN_RECENT+latest_25_xml+XML_END)
write_file("RSS/recent_25.xml", XML_BEGIN_RECENT+latest_25_xml+XML_END)
def create_48h_latest(df):
last_48_hours = df[df['timestamp'] > datetime.now() - pd.Timedelta(days=2)]
last_48_xml = "\n".join([make_torrent_entry(i[0], i[1], i[3]) for i in last_48_hours.values])
write_file("RSS/latest_48/index", XML_BEGIN_LAST+last_48_xml+XML_END)
write_file("RSS/latest_48h.xml", XML_BEGIN_LAST+last_48_xml+XML_END)
def create_df():
torfiles_scrape = requests.get("https://upload.fieryeagle.org/torfiles", auth=("",copyparty_token))