updated rss generator for copyparty
This commit is contained in:
15
rss_gen.py
15
rss_gen.py
@@ -68,16 +68,11 @@ def create_48h_latest(df):
|
||||
def create_df():
|
||||
torfiles_scrape = requests.get("https://upload.fieryeagle.org/torfiles", auth=("torbot",copyparty_token))
|
||||
soup = BeautifulSoup(torfiles_scrape.content, "html.parser")
|
||||
torrent_files_names = [i.find_all("td")[1].text for i in soup.find_all("tbody")[0].find_all("tr")]
|
||||
torrent_files_timestamps = [i.find_all("td")[7].text for i in soup.find_all("tbody")[0].find_all("tr")]
|
||||
torrent_files_timestamps = [datetime.strptime(i, "%Y-%m-%d %H:%M:%S") for i in torrent_files_timestamps]
|
||||
torrent_files_upload_ip = [i.find_all("td")[4].text for i in soup.find_all("tbody")[0].find_all("tr")]
|
||||
|
||||
df = pd.DataFrame({
|
||||
"name": torrent_files_names,
|
||||
"timestamp": torrent_files_timestamps,
|
||||
"upload_ip": torrent_files_upload_ip
|
||||
})
|
||||
rows = [i.find_all("td") for i in soup.tbody.find_all("tr")]
|
||||
filtered_rows = [[i[1].text, i[5].text, datetime.strptime(i[8].text, "%Y-%m-%d %H:%M:%S")] for i in rows]
|
||||
df = pd.DataFrame(
|
||||
data=filtered_rows, columns=["name", "upload_ip", "timestamp"]
|
||||
)
|
||||
|
||||
df['is_repack'] = df['name'].str.contains('DODI', case=False)
|
||||
return df[df["upload_ip"] == "49.12.185.202"]
|
||||
Reference in New Issue
Block a user