@Illyana @NicolBolas Here you are!
This is sorted by time read. The forum only provides data rounded to days if you have more than a day, hours if you have more than an hour, and minutes otherwise. I have converted all to minutes, but this does result in oddly-round numbers for most people. This is simply a matter of rounding.
The top 3 post readers are:
- @Got_a_Screw_Loose
- @Xenon27
- @Anomalocaris
- Skip a few
- @TaranMayer
This took me an hour two of messing around with making some web scraping scripts. @DRow could have just hit “Export Users”. Tfw I’m not an admin.
This is the code, in case anyone cares.
soup = BeautifulSoup(open("Info.txt", encoding='utf-8'), 'html.parser')
sauce = soup.findAll('tr', class_="ember-view")
with open('users.csv', mode='w') as user_file:
users = csv.writer(user_file, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL)
users.writerow(['Username', 'Likes Recieved', 'Likes Given', "Topics", 'Replies', 'Viewed', 'Read', 'Visits', 'Time Read'])
numdone = 0
for group in sauce:
rowdata = []
with open('users.csv', mode='a', newline='') as user_file:
users = csv.writer(user_file, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL)
user = group.findChildren('a')[1].get_text(strip=True)
rowdata.append(user)
nums = group.findChildren('span', {"class": "number"})
for num in nums:
try:
rowdata.append(str(num.attrs['title']).replace(',', ''))
except:
rowdata.append(num.get_text(strip=True))
time = group.findChildren('span', {"class": "time-read"})[0].get_text(strip=True).replace(' ', '').replace('<', '')
time_int = int(time[:-1])
units = time[-1]
final_time = 0
if(units=='d'):
final_time = time_int*1440
elif(units=='h'):
final_time = time_int*60
elif(units=='m'):
final_time = time_int
else:
final_time = "unknown"
rowdata.append(final_time)
users.writerow(rowdata)
numdone += 1
print(numdone)