Open testdev123456 opened 3 years ago
same here, since they changed Webpage Design the script doesnt work anymore.
I changed a bit the script and updated to work with newly updated cam4
I changed a bit the script and updated to work with newly updated cam4
worked for me. thank you for taking the time to share it with us !!
@testdev123456 I'm working on a modification https://github.com/horacio9a/cam4-anonymous in the meantime you can use adapted @ahsand97 which works perfectly now with Streamlink instead of the outdated Livestream. Look at https://github.com/horacio9a/CAM4Recorder
Thanks for your solution, @ahsand97 It works perfectly!
@ahsand97 @horacio9a @beaston02 Do you have a fix for beaston02's CB recorder? It suddenly stopped working this week :(
Thanks for your solution, @ahsand97 It works perfectly!
@ahsand97 @horacio9a @beaston02 Do you have a fix for beaston02's CB recorder? It suddenly stopped working this week :(
Yes, basically the same script but using CB's links, the only things needed are like if you were using the C4 recorder (having a config.conf file with whishlist, save_directory inside). There was a section gender used previously in the conf file but is pretty irrelevant, only model names in whishlist are needed.
please help me to port for stripchat.com
should be it but it's not working
https://stripchat.com/api/front/v2/models/username/{self.modelo}/cam
should be it but it's not working
https://stripchat.com/api/front/v2/models/username/{self.modelo}/cam
Is that the URL from that page?? that API doesn't seem to have the url for the streaming directly, I'd have to dig a little bit to see how to make it work since every page is differend depending of how their API exposes the streaming links
not sure but it should be this URL, i'm learning.
the URL is https://stripchat.com/api/front/v2/models/username/LaraHenao/cam?timezoneOffset=0&triggerRequest=loadCam&primaryTag=girls&uniq=391nrs5d2w67au4g
in LaraHenao
I changed to {self.model}
on script to get the model but it doesn't seem to work, help me please.
it doesn't seem to work
That API doesn't provide the URL for the streaming, meanwhile C4 and CB's do, there's either another API where the URLs for the streaming are provided or is in the source code of the page when you do a get request to an online model (ex: http://stripchat.com/someModel)
you're right this API doesn't provide streaming URL, source code doesn't provide either, probably another API provides URL, could you give me a hint to find it.
I looked into Stripchat a while back, and wrote something that was very sloppy, but never released anything publicly (nor do I plan to). I saw it brought up on here, so I figured Id chime in. This is longer than I was anticipating, but Im not active on here at all (as you may have noticed) so I wanted to include info that may be helpful to you later. Sorry if this is a bit unorganized.
The url posted above:
https://stripchat.com/api/front/v2/models/username/LaraHenao/cam?timezoneOffset=0&triggerRequest=loadCam&primaryTag=girls&uniq=391nrs5d2w67au4g
does provide all the info to record public shows. The hls stream is in the format of:
https://b-hls-17.strpst.com/hls/50961685/50961685.m3u8
if you returned the result of the request as:
result = requests.get("https://stripchat.com/api/front/v2/models/username/LaraHenao/cam?timezoneOffset=0&triggerRequest=loadCam&primaryTag=girls&uniq=391nrs5d2w67au4g").json()
you could format the hls url with:
"https://{server}.strpst.com/hls/{id}/{id}.m3u8".format(server=result['cam']['viewServers']['flashphoner-hls'], id=result['user']['user']['id']
that url (https://b-hls-17.strpst.com/hls/50961685/50961685.m3u8) can then be passed to streamlink, livestreamer, FFMPEG, or whatever else you use to capture hls streams.
Also, One thing Stripchat lacks is a WebSockets connection, or a simple single url to call to get all online models, particularly with no delay on their online status. You can repeatedly call the url and increase the page count, but it takes some time to get through the thousands of online models, and even then it has a minute or so delay on their status changes (coming online, going into private/group shows...). The best method I found was to use the "favorites" api (this is called when you go to your "favorites page) to list the models. It reflects the models status in real time. Its not instant like a WebSockets connection would be of course (since you only get updates when you call that url), but if you call it lets say ever 10 seconds or so, then you're catch their status changes with at most a 10 second delay. Also, this allows you to only monitor the status of the models you want to record. There is a limit of 99 (I believe its actually be 100 although my code says 99), so if you have less than 100 models, you can check them all in a single request instead of having to request over and over to get through all online models.
Again, my code is very sloppy, but this is the portion I used for checking that status of models.
EDIT - I apparently don't know how to format code. The line breaks aren't showing in the code below.
from urllib.parse import quote def genStatusIdUrl(ids): i=0 m = "" if len(ids) > 99: print('only 99 models can be checked at once') ids = ids[0:99] for model in ids: m += quote("modelIds[{}]".format(i)) + '=' + str(model) + '&' i+=1 url = URL.status_ids.format(m=m) return url
The "URL.status_ids" references "'https://stripchat.com/api/front/models/list?{m}&uniq='+ get_random_string(16)"
the "get_random_string(16)" is calling the following function:
import random import string def get_random_string(length): charactors = string.ascii_letters + ''.join([str(i) for i in range(0, 10)]) result_str = ''.join(random.choice(charactors) for i in range(length)) return result_str
You would pass a list of the ids of the models you wish into the genStatusIdUrl function. ie:
genStatusIdUrl([50961685, 57411509])
would return
https://stripchat.com/api/front/models/list?modelIds%5B0%5D=50961685&modelIds%5B1%5D=57411509&&uniq=FRBurUADrlesqps2
which then could be checked through requests.get which would return the info in json format.
I hope this helps.
I hope this helps.
It did help, based on your feedback I adapted the script to work with StripChat too for @senhor-R
thank you very much, it's working. thank you very much for your help
Does not download anything
Does not download anything
still working
Does not download anything
still working
It detects the models in line, but downloads absolutely nothing. What can I check to understand the malfunction? Does the version you previously posted work?
Thank you for you code for Stripchat! All working. But I have a memory leak, size in RAM grows indefinitely.
sorry to bother, but few days ago the script stopped working since the website changed desing. I believe it may have to do with not finding "videoPlayUrl" or "videoAppUrl" strings so the hls link cannot be parsed like before (I know they haven't changed the hls url at all)
Also, github shows your script was updated 2 days ago! and... I CANNOT SEE CHANGES ! I'm so confused.