lossless1024 / StreaMonitor

Adult live stream downloader for advanced people. I could have chosen a better name.
GNU General Public License v3.0
172 stars 42 forks source link

Cam4 termination issues #104

Open clayinjax opened 10 months ago

clayinjax commented 10 months ago

When a Cam4 broadcaster ends their transmission, error messages are generated by SM and the broadcaster's status is inconsistent. Eventually, the status updates correctly, but then that same broadcaster's status is rapidly rechecked every 2 seconds. The mp4 is recorded correctly.

I'm concerned Cam4 could block or ban the stream so I stop the broadcaster. Thanks for a great program, I really like it. Please advise

Traceback (most recent call last): File "E:\StreaMonitor Chat\StreaMonitor-master\streamonitor\bot.py", line 148, in run video_url = self.getVideoUrl() ^^^^^^^^^^^^^^^^^^ File "E:\StreaMonitor Chat\StreaMonitor-master\streamonitor\sites\cam4.py", line 10, in getVideoUrl return self.getWantedResolutionPlaylist(self.lastInfo['cdnURL'])


KeyError: 'cdnURL'
2023-08-20 16:54:45,655 - INFO - [C4] bigdane42: Channel online
2023-08-20 16:55:05,842 - INFO - [C4] bigdane42: Channel online
2023-08-20 16:55:05,842 - ERROR - [C4] bigdane42: 'cdnURL'
Traceback (most recent call last):
  File "E:\StreaMonitor Chat\StreaMonitor-master\streamonitor\bot.py", line 148, in run
    video_url = self.getVideoUrl()
                ^^^^^^^^^^^^^^^^^^
  File "E:\StreaMonitor Chat\StreaMonitor-master\streamonitor\sites\cam4.py", line 10, in getVideoUrl
    return self.getWantedResolutionPlaylist(self.lastInfo['cdnURL'])
                                            ~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'cdnURL'
2023-08-20 16:55:05,842 - INFO - [C4] bigdane42: Channel online
2023-08-20 16:55:26,256 - INFO - [C4] bigdane42: Channel online
2023-08-20 16:55:26,256 - ERROR - [C4] bigdane42: 'cdnURL'
Traceback (most recent call last):
  File "E:\StreaMonitor Chat\StreaMonitor-master\streamonitor\bot.py", line 148, in run
    video_url = self.getVideoUrl()
                ^^^^^^^^^^^^^^^^^^
  File "E:\StreaMonitor Chat\StreaMonitor-master\streamonitor\sites\cam4.py", line 10, in getVideoUrl
    return self.getWantedResolutionPlaylist(self.lastInfo['cdnURL'])
                                            ~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'cdnURL'
2023-08-20 16:55:26,256 - INFO - [C4] bigdane42: Channel online
2023-08-20 16:55:46,451 - INFO - [C4] bigdane42: Channel online
2023-08-20 16:55:46,451 - ERROR - [C4] bigdane42: 'cdnURL'
Traceback (most recent call last):
  File "E:\StreaMonitor Chat\StreaMonitor-master\streamonitor\bot.py", line 148, in run
    video_url = self.getVideoUrl()
                ^^^^^^^^^^^^^^^^^^
  File "E:\StreaMonitor Chat\StreaMonitor-master\streamonitor\sites\cam4.py", line 10, in getVideoUrl
    return self.getWantedResolutionPlaylist(self.lastInfo['cdnURL'])
                                            ~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'cdnURL'
2023-08-20 16:55:46,451 - INFO - [C4] bigdane42: Channel online
2023-08-20 16:56:07,075 - INFO - [C4] bigdane42: Channel online
2023-08-20 16:56:07,075 - ERROR - [C4] bigdane42: 'cdnURL'
Traceback (most recent call last):
  File "E:\StreaMonitor Chat\StreaMonitor-master\streamonitor\bot.py", line 148, in run
    video_url = self.getVideoUrl()
                ^^^^^^^^^^^^^^^^^^
  File "E:\StreaMonitor Chat\StreaMonitor-master\streamonitor\sites\cam4.py", line 10, in getVideoUrl
    return self.getWantedResolutionPlaylist(self.lastInfo['cdnURL'])
                                            ~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'cdnURL'
2023-08-20 16:56:07,078 - INFO - [C4] bigdane42: Channel online
2023-08-20 16:56:27,339 - INFO - [C4] bigdane42: No stream
2023-08-20 16:56:29,547 - INFO - [C4] bigdane42: Channel online
2023-08-20 16:56:29,547 - ERROR - [C4] bigdane42: 'cdnURL'
Traceback (most recent call last):
  File "E:\StreaMonitor Chat\StreaMonitor-master\streamonitor\bot.py", line 148, in run
    video_url = self.getVideoUrl()
                ^^^^^^^^^^^^^^^^^^
  File "E:\StreaMonitor Chat\StreaMonitor-master\streamonitor\sites\cam4.py", line 10, in getVideoUrl
    return self.getWantedResolutionPlaylist(self.lastInfo['cdnURL'])
                                            ~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'cdnURL'
2023-08-20 16:56:29,547 - INFO - [C4] bigdane42: Channel online
2023-08-20 16:56:49,848 - INFO - [C4] bigdane42: No stream
2023-08-20 16:56:52,062 - INFO - [C4] bigdane42: No stream
2023-08-20 16:56:54,243 - INFO - [C4] bigdane42: No stream
2023-08-20 16:56:56,572 - INFO - [C4] bigdane42: No stream
2023-08-20 16:56:58,783 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:00,956 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:03,146 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:05,324 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:07,507 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:09,731 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:11,913 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:14,107 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:16,314 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:18,514 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:20,696 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:22,998 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:25,174 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:27,340 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:29,519 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:31,716 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:33,888 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:36,066 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:38,291 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:40,516 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:42,691 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:44,900 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:47,091 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:49,333 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:51,508 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:53,691 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:55,873 - INFO - [C4] bigdane42: No stream
2023-08-20 16:57:58,094 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:00,283 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:02,466 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:04,641 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:06,825 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:08,991 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:11,183 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:13,358 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:15,792 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:18,075 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:20,261 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:22,433 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:24,600 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:26,775 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:28,991 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:31,166 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:33,333 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:35,518 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:37,691 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:39,915 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:42,092 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:44,258 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:46,433 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:48,616 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:50,802 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:53,175 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:55,350 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:57,525 - INFO - [C4] bigdane42: No stream
2023-08-20 16:58:59,692 - INFO - [C4] bigdane42: No stream
2023-08-20 16:59:01,870 - INFO - [C4] bigdane42: No stream
2023-08-20 16:59:04,050 - INFO - [C4] bigdane42: No stream
2023-08-20 16:59:06,232 - INFO - [C4] bigdane42: No stream
2023-08-20 16:59:08,409 - INFO - [C4] bigdane42: No stream
2023-08-20 16:59:10,600 - INFO - [C4] bigdane42: No stream
2023-08-20 16:59:12,799 - INFO - [C4] bigdane42: No stream
2023-08-20 16:59:14,976 - INFO - [C4] bigdane42: No stream
2023-08-20 16:59:17,159 - INFO - [C4] bigdane42: No stream
2023-08-20 16:59:19,350 - INFO - [C4] bigdane42: No stream
2023-08-20 16:59:21,523 - INFO - [C4] bigdane42: No stream
2023-08-20 16:59:23,699 - INFO - [C4] bigdane42: No stream
2023-08-20 16:59:25,880 - INFO - [C4] bigdane42: No stream
2023-08-20 16:59:32,462 - INFO - [C4] bigdane42: No stream
2023-08-20 16:59:34,624 - INFO - [C4] bigdane42: No stream
2023-08-20 16:59:34,740 - INFO - [C4] bigdane42: Stopping...
2023-08-20 16:59:34,740 - INFO - manager_cli: OK
> 2023-08-20 16:59:36,638 - INFO - [C4] bigdane42: Stopped
testdev123456 commented 10 months ago

I've seen other cam4 scripts broken this week. cam4 now has some rate-limit to their rest-api and will easily ban your IP for life if you make requests to their api without some sort of special header/cookie sent, I believe. I'm not sure if this issue is related.

manitou153 commented 10 months ago

It is the same with CB, when I add a streamer to the wanted list I have the message "rate limited" in the status... Is it the same for you ? Thanks !

clayinjax commented 10 months ago

A previous poster, noted above, commented on the rate limited issue on Cam4.

As far as the issue I posted, this is a Cam4 issue. I encountered it again today. Every time a performer ends a broadcast, I get the messages as noted at the bottom of the original post. The problem is, as noted in the example posted, StreaMonitor "hangs" with one inquiry after another. This seems a sure way to get banned by Cam4.

manitou153 commented 10 months ago

I have been using StreaMonitor for a few days inside a Docker container associated with another container containing a VPN, it seems to work well but I have not yet used the debug mode to confirm the correct operation at 100%. I also no longer have the "rate limited" on CB with this system.

clayinjax commented 10 months ago

Manitou153, this is more about a Cam4 issue. I still get rate limited on a few CB streams, but it seems to function OK; for now. Thanks.

manitou153 commented 10 months ago

sorry, I didn't mention it earlier but my tests with containers concerned a majority of models on C4

clayinjax commented 10 months ago

Understood. I'm intrigued with the idea of Docker and containers. I've found a lot of documentation, but I'm a novice, so I'm not sure how to wade through it to implement. I appreciate your comments. Thanks.

manitou153 commented 10 months ago

This will depend on the platform used. What OS are you using? Personally, Docker runs on Linux and I followed the documentation on the repository to build the StreaMonitor container. The first thing to do is to install Docker on the host machine.

clayinjax commented 10 months ago

It looks like it runs in Windows too. Is there some advantage to running SM in Docker other than the notes you made above? I do like the VPN idea since I run Private Internet Access. I hope the author gives an option to change the polling frequency, I'd like to increase that to avoid the possibility of a server ban. I appreciate the note. Thanks.

https://docs.docker.com/get-started/overview/

manitou153 commented 10 months ago

I don't think there is any difference other than what I mentioned above. Adding VPN seems to improve capture stability. After two days of use, everything seems to work on C4 and CB.