switched position of timestamp and ip
This commit is contained in:
@@ -56,13 +56,13 @@ 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])
|
||||
latest_25_xml = "\n".join([make_torrent_entry(i[0], i[2], i[3]) for i in most_recent_25.values])
|
||||
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_hours = last_48_hours.sort_values("timestamp", ascending=False)
|
||||
last_48_xml = "\n".join([make_torrent_entry(i[0], i[1], i[3]) for i in last_48_hours.values])
|
||||
last_48_xml = "\n".join([make_torrent_entry(i[0], i[2], i[3]) for i in last_48_hours.values])
|
||||
write_file("RSS/latest_48h.xml", XML_BEGIN_LAST+last_48_xml+XML_END)
|
||||
|
||||
def create_df():
|
||||
|
||||
Reference in New Issue
Block a user