Botspot / pi-apps-analytics

15 stars 4 forks source link

How are these numbers being gathered #1

Closed CleanMachine1 closed 3 years ago

CleanMachine1 commented 3 years ago

What script are you using, could you share it

Botspot commented 3 years ago

What script are you using, could you share it

No, I'm not able to share the entire script - it contains both my Github password and my bitly API key.
Is there anything in particular you want to know about the script?

CleanMachine1 commented 3 years ago

Wow, ok

how are you going to keep it updated? Cron? Manual? Some github setup thing?

Botspot commented 3 years ago

Wow, ok

how are you going to keep it updated? Cron? Manual? Some github setup thing?

I'll probably run it manually the first few times to ensure reliability. (The whole script is quite complicated and has to partially circumvent some restrictions in the Bitly API)
Then if that goes well I'll probably shove the script path in autostart or something and forget about it.

slashtechno commented 3 years ago

@Botspot Is there any tutorial that teaches this?

Also, do you know how to accomplish this in Python?

Botspot commented 3 years ago

@Botspot Is there any tutorial that teaches this?

Also, do you know how to accomplish this in Python?

I used a bash script, though you could also use python. Basically, you research how to use the Bitly API to determine the number of clicks from a link. In a bash script, you do this with the curl command. Like I said earlier, I took this a step further and made a script to circumvent Bitly's 30-day limitations, and that is so confusing that even I don't understand how my script works anymore.

For convenience, here's Bitly's official API reference for bitly clicks: https://dev.bitly.com/api-reference#getClicksForBitlink