dvingerh / PyInstaLive

Python script to download Instagram livestreams.
MIT License
547 stars 111 forks source link

Too often blocked, How to avoid it? #160

Open favainhat opened 1 year ago

favainhat commented 1 year ago

When I use this script, I constantly get blocked within 5 minutes.

In my experience, it seems to be worse in 4.0.2 compared to 3.2.4. Anyway, Obtaining a live URL just retrieving user information, it seems not direct reason for the blocked.

I think periodic polling happens from comments or heartbeats and it is the real reason. I mean, (Tested only on 3.2.4)

download_comments = False
do_heartbeat = False

If I do this, I think it will be less blocked. Or Is there another way?

Nonetheless, doing this will make your account being blocked.

:loop
pyinstall -df
timeout 15 > nul
goto loop

However, we can know the start of Instagram Live With a browser notification. (Probably, your account is conneted on your phone and all notifications are should turn on.) There is no easy way to detect web push, so I have to detect Windows notifications. And simply run pyinstallive -df

I wanted to use the C# example, but due to memory leaks, I have to use ahk script in internet with modification. I put it in my github repo.(Windows only!) https://github.com/favainhat/igl_demo

I have candidate for more better, but it needs more testing....

cykac04 commented 1 year ago

Is instagram web push only work for linux Firfox when the browser is opened? I cannot find any notification in the dbus monitor.

favainhat commented 1 year ago

yes. Of course, you should subscribe from firefox Instagram notifications, and receive notifications through native notifications.

However, if you can take the risk, it may be better to rely on mqtt notifications. I don't think that will happen too often, If you receive the notification too late, https://github.com/evanc577/download-iglive I heard this will allow to get the live from the start. (ffmpeg and ffprobe must be installed.)

Milor123 commented 11 months ago

yes. Of course, you should subscribe from firefox Instagram notifications, and receive notifications through native notifications.

However, if you can take the risk, it may be better to rely on mqtt notifications. I don't think that will happen too often, If you receive the notification too late, https://github.com/evanc577/download-iglive I heard this will allow to get the live from the start. (ffmpeg and ffprobe must be installed.)

Thank u very much for search. I was looking for it, i want try it. :3 Love you bro!