View statistics for threads and attachements

Archerite

Well-Known Member
OP
Member
Joined
Sep 16, 2018
Messages
209
Trophies
0
Age
39
XP
1,518
Country
Netherlands
I have quite a few threads and within them multiple preview downloads attached to some posts. Is there an official way to keep track of views/download statistics? Like how many views or downloads per month for example? Maybe the downloads section of this site is a better place for them anyway, but are there statistics available there?

I am looking for monthly, weekly or daily:
- views per thread
- views per attachment.

Besides my own curiosity this is also a request from the original game's owners that I am using the assets from. :)

I can create my own scripts that scrape my threads and attachments for this...but if there is an official way that would be better.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
34,063
Trophies
2
Website
trastindustries.com
XP
22,945
Country
United Kingdom
Attachments are typically viewed as a minor convenience than an a "for real" distribution method. For that then https://gbatemp.net/download/ would probably want to be the suggested thing if you want the gbatemp site to host things and does provide stats.
Beyond that script with wget and some regex is your best bet.
 

Archerite

Well-Known Member
OP
Member
Joined
Sep 16, 2018
Messages
209
Trophies
0
Age
39
XP
1,518
Country
Netherlands
Attachments are typically viewed as a minor convenience than an a "for real" distribution method. For that then https://gbatemp.net/download/ would probably want to be the suggested thing if you want the gbatemp site to host things and does provide stats.
Beyond that script with wget and some regex is your best bet.
Understandable that it's not included. I am actually using python and selenium to automate the login and go to the relevant pages that contain the information I need. Just hoping that while I am writing the script I am not getting locked out for multiple login attempts :wink:

Using the script I can already login and it's clicking away all the popups that get in the way! :D
 

Archerite

Well-Known Member
OP
Member
Joined
Sep 16, 2018
Messages
209
Trophies
0
Age
39
XP
1,518
Country
Netherlands
Figuring out how selenium works took me a while but my script is complete! It can login to GBATemp, click away the popups, grab the "watched threads" and then for about 9 specific threads it collects all attached file information. Then writes this to a json file. The entire script runs in about 15 seconds! :D

Code:
{
  "time": "1624377767",
  "threads": [
    {
      "id": "thread-590300",
      "title": "View statistics for threads and attachements",
      "views": "163",
      "replies": "2"
    },
    {
      "id": "thread-525502",
      "title": "Batterycheck - 3DS",
      "views": "5919",
      "replies": "32"
    }
  ],
  "files": [
    {
      "url": "https://gbatemp.net/attachments/preview-batcheck-wii-v0-1-dol-zip.151240/",
      "name": "preview-batcheck-wii-v0.1.dol.zip",
      "size": "270.4 KB",
      "views": "114"
    },
    {
      "url": "https://gbatemp.net/attachments/batterycheck-gc-preview-2-dol-zip.153405/",
      "name": "batterycheck-gc-preview-2.dol.zip",
      "size": "206.4 KB",
      "views": "120"
    }
  ]
}
This is just a sample of the information the script collects for all my watched threads. I do not go through all those threads to collect attached file statistics, but only for a few specific pages of my own threads. By running this script every month, week or day I can collect the statistics I wanted. :D

I can share the script if there is interest but it is very specific for what I needed. :)
 
General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: I hear if you talk too much you have to cut off a finger... What parts do you cut off for other...