Open Stevecaboose opened 1 year ago
is_online function only checks for the top 500 model only https://github.com/oliverjrose99/Recordurbate/blob/3c4ea62fcad3d1ec6ab9bc350d84cbb9403102a6/recordurbate/bot.py#L74
What's the reason behind that number?
limitation from the API, it will be overloaded if we downloaded all the info of all the online models there are thousands and thousands of online models at a time
i fixed this issue locally by using the old code for is_online function in bot.py
this is the code that works for me
def is_online(self, username):
url = "https://chaturbate.com/get_edge_hls_url_ajax/"
headers = {"X-Requested-With": "XMLHttpRequest"}
data = {"room_slug": username, "bandwidth": "high"}
try:
time.sleep(3) # fix issue 30
r = requests.post(url, headers=headers, data=data)
if r.json()["room_status"] == "public":
return True
return False
except Exception as e:
self.logger.exception(e)
return None
@divenxx that code works for me too. I will test for a while.
I have noticed that not everyone (tested with all of them online) will be downloaded in the list. Some will download some wont. Is there an explanation for this?