LINE icon indicating copy to clipboard operation
LINE copied to clipboard

longPoll() Problem

Open KylinWu opened this issue 9 years ago • 11 comments

I made an echo bot using by client.longPoll() function, but I just got an "account banned" in a few minute.

KylinWu avatar Nov 26 '15 13:11 KylinWu

Did you mean your IP is banned by line server?

I test the echo bot and my ip is banned about 40 minutes.

violarulan avatar Jan 03 '16 15:01 violarulan

Same with me. I got banned after using longPoll(), and this is affected to another device (in same network) who using LINE app on smartphone.

Luckily, I have dynamic internet IP, so I just need to restart my internet modem. But that's not a solution at all.

So, what is the longPoll() problem actually?

janglapuk avatar Jan 05 '16 03:01 janglapuk

@janglapuk

maybe the frequency of longPoll() is too high.

I slowed down it and got fewer ban.

I tested my code in python shell, manually executing client.longPoll() every few seconds.(I didnt execute it too regularly). The code is good and I got no ban.

violarulan avatar Jan 05 '16 10:01 violarulan

@masahoshiro I tried sleeping for a few random seconds between every client.longPoll(), but I still get bans within a minute or two. Mind to give some more details on how you stay unbanned?

Kiyume avatar Jan 06 '16 14:01 Kiyume

So, it there any way to get unbanned? Or is it permanent?

applefreak avatar Jan 24 '16 14:01 applefreak

Before, my IP gets banned frequently.. I subclassed LineClient class and uses my own THttpCllent which uses keep-alive connection instead of reopening the connection in every requests.

Well, it works for me before.. but unfortunately, my IP starts to get banned again lately.. dunno why

nieltg avatar Jan 25 '16 14:01 nieltg

How long is your IP banned? 1 hour or longer?

sschang123 avatar Jan 26 '16 06:01 sschang123

every time my IP gets banned for 24 hours

kakajansh avatar Feb 19 '16 09:02 kakajansh

I solve it by write some code below

while True: op_list = [] for op in client.longPool(): op_list.append(op) for op in op_list """some code""" time.sleep(1)

pinfort avatar May 14 '16 14:05 pinfort

oh,no, indent was deleted

pinfort avatar May 14 '16 14:05 pinfort

.....

netwareboss avatar Jan 29 '17 21:01 netwareboss