carpedm20 / LINE

May the LINE be with you...
http://carpedm20.github.io/line/
Other
823 stars 192 forks source link

longPoll() Problem #58

Open KylinWu opened 8 years ago

KylinWu commented 8 years ago

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

violarulan commented 8 years ago

Did you mean your IP is banned by line server?

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

janglapuk commented 8 years ago

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?

violarulan commented 8 years ago

@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.

Kiyume commented 8 years ago

@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?

applefreak commented 8 years ago

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

nieltg commented 8 years ago

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

sschang123 commented 8 years ago

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

kakajansh commented 8 years ago

every time my IP gets banned for 24 hours

pinfort commented 8 years ago

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 commented 8 years ago

oh,no, indent was deleted

netwareboss commented 7 years ago

.....