Damianonymous / ChaturbateRecorder

86 stars 43 forks source link

ImportFollowed.py on Windows #8

Open kilimanj99 opened 3 years ago

kilimanj99 commented 3 years ago

Hello,

Sorry if this is not the right place for this, this is my first time. I've been playing with ImportFollowed.py for a bit now and can't seem to get it to work. Not sure if its broken or not.

When I run it I get the following:

getting followed models... Traceback (most recent call last): File "ImportFollowed-Dev.py", line 76, in getModels() File "ImportFollowed-Dev.py", line 55, in getModels LIST = soup.findAll('ul', {'class': 'list'})[0] IndexError: list index out of range

I've found that it is out of range because it is empty due to login issues. So I removed the login check and just made it login anyway and this is what happens:

Traceback (most recent call last): File "ImportFollowed-Dev.py", line 75, in login() File "ImportFollowed-Dev.py", line 32, in login data['csrfmiddlewaretoken'] = soup.find('input', {'name': 'csrfmiddlewaretoken'}).get('value') AttributeError: 'NoneType' object has no attribute 'get'

I've tried several different logon methods and syntax but I cannot seem to get it right. From what I can find the get errors possibly because there is no data to get from or find but I'm not sure.

When I print(result.text) which is just before this, I get this, many more lines of this, I just didnt paste it all. Nothing readable. ��▲↨��b��'B���җ��f$���ۧ�‼i^����♫��*D���RmN; �‼�n^�i▲0��U�- �B↓��xnQ▲�+��IȮ90���‼�7¶�DΡ�#��S��9a♠&↨∟M������ɋ�� ►�g5��v�.▲!���♠▲�q�ȥ��gx▬#ݠ�♠IsD�QwR�}9��?�-Sz☻Z�h�j‼-◄�|D��7���N��Q{!�g\6��

I do have it setup right in the conf file and verified the user and pass do work manually.

Damianonymous commented 3 years ago

Hi. Unfortunately, this feature has not worked since the models were split into online and offline rooms. https://github.com/Damianonymous/ChaturbateRecorder/issues/5 see this topic and check the application patch @vap0r1 I don't know if Import works in it, unfortunately not in my Windows 7.

kilimanj99 commented 3 years ago

Awww that's too bad, Thanks for the quick reply and recorder script, its wonderful.

kilimanj99 commented 3 years ago

Well I'm not a Python developer so this may not be perfect but it does work. I wanted a list of all my followed models. I noticed a pattern so what I did was go to each followed page copy and paste the entire page just as plain text to notepad. Then I copied all the pages from notepad into excel and split the column with a space as the delimiter. In the second column I sorted and looked for the word chat. Then deleted everything else. That left me with modelname's chat room. I replaced 's chat room with nothing and whallah, I now have a list of all my followed.

So why? Different models are on at different times, and I found I had a lot of garbage in followed. I wanted to clean it up but also look at what I was missing, if there was anyone worth recording on a regular basis. I copied the entire followed list into the wanted.txt file and the whole thing barfed. Too many I suppose. It didn't even try to record the first few.

So I added this to the recorder code, along with the definitions where the others where and the entries in the conf file. I then call it once on each run. I'll have task scheduler run it for 2 hours then kill it and start again. Each time I'll get a different batch. Should be interesting, I'm looking forward in seeing how well this works over time. I found I can record about a dozen at once with no impact too.

Now the last step will be to automate programmatically that first step of pulling all my followed models.

def RandomWanted(): import random followline = '' chosenmodels = open(setting['chosen'], 'r').read().splitlines() for chosenmodel in chosenmodels: if followline != '': followline += "\n" followline += chosenmodel lines = open(setting['followed'], 'r').read().splitlines() for i in range(setting['ModelsToLookFor'], 0, -1): if followline != '': followline += "\n" followline += random.choice(lines) wanted = open(setting['wishlist'], 'w') wanted.write(followline) wanted.close()

Damianonymous commented 3 years ago

You may not be a Python developer, but you are a born developer ;) I don't even write in English, let alone programming language :) I am trying to search for updates in applications removed by the DMCA. It would be nice if you could create your fork and run tests in it, or open pull requests in this repository.

kilimanj99 commented 3 years ago

Haha thanks. This was my first Python experience but I've done a bit in other languages that are similar. If I figure out how to do the rest that I want I'll see if I can figure out this site and do the fork. I'm a bit stuck on the login. I noticed that the crfmiddlewaretoken changes every time so I'm not sure how this will work. I'll do a bit more google searching and trial and error this week and see what happens. The code above though has been working nicely the past few days. Getting all sorts of recordings I never even knew I followed. Removed at least a dozen already.