So streamlink does use the bonga script = plugin.You have to read the script to see what it does.
Code:
def _get_stream_uid(self, username):
m = md5(username.encode('utf-8') + str(time.time()).encode('utf-8'))
return m.hexdigest()
It builds a MD5 hash from username & time = unique MD5 hash (because time is always else of course) which get used one time.If you would make a re-call with same hash then you get rejected by server to access the stream as I said before.Server does check the hash you did send and must do a check whether this hash was already send or not (compare logs) and if the hash was found then it will reject the access till the logged hash get expired in the log etc.Its just a verify check to prevent calling the stream more than one time with same hash.There are also other cam sites using hash log & checks to prevent the same.Mostly depends on stream IP + Model X + hash.In this case if you want to play & record the stream same time and using same stream datas then it will fail.In this case just change the hash a little and then you can do both.Other sites only allow to use one stream server address for one instance only like CB (free users / I am no member) and then you need to change the server address number to call another or same stream too.If you check CB then you see they have a lot addresses from 0 - 100 + you can use and also diffrent server names you can use or switch.
As I already said you just need to build any unique MD5 hash and use it for your playpath after modelname.
The script does use hashlib import md5 to build a MD5 hash.So if you code in any not scripting language then you could use cryptohash.lib for example to build MD5 hashes or also many other hashes etc.
greetz