LINE icon indicating copy to clipboard operation
LINE copied to clipboard

If you have questions

Open carpedm20 opened this issue 10 years ago • 39 comments

Maybe I or others can help you from here

carpedm20 avatar Dec 14 '14 07:12 carpedm20

Thank you for your line python api share. I'm very interested to send and receive Line messages by api on Windows OS.

I try to login for sending a massage by Python; but I'm still unable to login. Could you advise me what I do wrong? line login fail

Best : [email protected]

Jirayouth avatar Dec 20 '14 05:12 Jirayouth

I'm getting the same error as Jirayouth... is there a solution?

rconnellii avatar Mar 23 '15 17:03 rconnellii

Sorry, but this is a restricted question.

As exception described as,

raise Exception("Code is removed because of the request of LINE corporation")

lines related to login are removed because of the request of LINE corporation.

I cannot help you with this question, but what I can help you is that reading my code can help you to solve this problem or googling also will help you.

carpedm20 avatar Mar 24 '15 05:03 carpedm20

Thanks for the information. I think I know how to get authToken.

webbhlin avatar May 08 '15 08:05 webbhlin

@Jirayouth @rconnellii you can comment that or remove code for raise exception to be continue next step

ArnonHongklay avatar Sep 27 '15 04:09 ArnonHongklay

LINE Corp. is blocking bot now…… How to avoid the blocking of it ??

AnonymousICE avatar Nov 13 '15 08:11 AnonymousICE

@AnonymousICE can you be more specific on what do you mean by "blocking"? I have a bot fetching messages running for about a week and it has no problem.

whitesn avatar Nov 16 '15 03:11 whitesn

If one can send or fetch in LINE, could advise step by step in detail? Thank you in advance.

Jirayouth avatar Nov 16 '15 04:11 Jirayouth

@whitesn

I ran the Bot in Taiwan. I am trying to make a Group-Protection Bot.

Every time I sent lots of commands , my Bot would be cannot to sent commands anymore after a few time. ( I think it is because LINE Corp. needs some time to notice that I sent too many commands. )

But after I restart the router , it start to work again. The command "sleep()" is really not a good idea to sorve this problem.

AnonymousICE avatar Nov 16 '15 06:11 AnonymousICE

@Jirayouth as per LINE corp., we can't discuss this thing here. All I can tell you is to check out the source to do a little tweaking or find out the way to get auth token.

@AnonymousICE what commands specifically? Their server obviously would define things that are impossible to be achieved on their mobile app as spam

ex: you request A to LINE Server, Server is processing, then you proceed to request B before request A is processed which may violates their protocol leading you to be banned.

Though I still don't know what exactly are you doing by Group Protection Bot

whitesn avatar Nov 16 '15 07:11 whitesn

@whitesn I use the function "longPoll()". I want to make my Bot have the capability which can kick the kicker out from the group when it get the operation "NOTICED_KICKOUTFROMGROUP".

( My LINE ID : sora0975848033 )

AnonymousICE avatar Nov 16 '15 07:11 AnonymousICE

@AnonymousICE Putting sleep in between each poll doesn't really hurt, and the only possible commands (requests) you send to LINE server are fetching action (long polling) and kick. How do you send lots of commands for kicking a person?

whitesn avatar Nov 16 '15 09:11 whitesn

@whitesn

< First capability : protect groups from kickers > If I want to protect all groups from kickers , I have to send "longPoll()" commands again and again , and send "kickoutFromGroup" command to kick the kicker out when I got the operation "NOTICED_KICKOUTFROMGROUP".

< second capability : protect groups from Kicking-Bot > If I add "sleep()" , the rate of protection might be too low to protect groups from Kicking-Bots , which can join into the group quickly and kick all the members out from group. I have to cancel the invitation before the Kicking-Bot join into the group with the operation "NOTICED_INVITE_INTO_GROUP". ( I will append the Kicking-Bots into my own blacklist first. )

AnonymousICE avatar Nov 16 '15 14:11 AnonymousICE

sleep(10) should be sufficient enough so that you won't be considered spam. I tried running longPoll() with sleep(10) and it doesn't seem to get banned after 30 minutes. Both capabilities are basically the same, the idea is:

  1. longPoll()
  2. Check if there is specific notification (NOTICED_KICKOUTFROMGROUP)
  3. Kick the specified target if exists.
  4. Sleep(10), go to 1

whitesn avatar Nov 16 '15 14:11 whitesn

@whitesn sleep(10) is too long for my Bot to protect all the groups from the Kicking-Bots with no any omissions. The Kicking-Bots join into groups very fast , there must be some way to avoid LINE Corp.'s detection so their Bot can deal with the invitation so immediately. I have to find out how they do this and use the same way to against their Bots.

AnonymousICE avatar Nov 16 '15 15:11 AnonymousICE

I see, but only people inside the group can invite another person, correct? Are the bots you dealing with kick all members without delay? My guess is still about manipulating the delay between longPoll(), might want to try lower value (e.g: 1)?

whitesn avatar Nov 16 '15 16:11 whitesn

@whitesn Some of the Kicking-Bots do have a delay time , but there are some dont ... My idea now is to run My Bot on unless 1 computer. Hope it can run successfully with different request IP sending commands by turns , but applying lots of servers cost me a lot of money … It isnt really a good way , right ? But I can only thought of this way …

AnonymousICE avatar Nov 16 '15 16:11 AnonymousICE

The problem honestly comes from LINE itself for letting every user in a group has the same privilege. Even your bot can be kicked and it's all messed up.

whitesn avatar Nov 16 '15 17:11 whitesn

@whitesn Yeah … It is all because of this ... But they have their purpose ... LINE Corp. doesnt want anyone to use the groups. Instead , they hopes the users can use the application "BAND". The groups capability was made for helping the woundeds in the 311 serious earthquake at first. But now , this capability is important to everyone.

AnonymousICE avatar Nov 16 '15 17:11 AnonymousICE

@AnonymousICE There honestly just no best solution onto this except battling with the minimal time allowed by LINE server protocol to not get kicked. Once there is a "plant" in the group your BOT safety is already not guaranteed.

whitesn avatar Nov 17 '15 10:11 whitesn

@whitesn So there is no any solution …… ?? ˊˋ

@carpedm20

AnonymousICE avatar Nov 17 '15 11:11 AnonymousICE

@AnonymousICE In my opinion, no, because the system is made by LINE. Join on gitter if you want to have faster time discussion, maybe we can find an idea on how to do it :)

whitesn avatar Nov 18 '15 04:11 whitesn

@whitesn My phone is too old to install Gitter app ... Orz I'll try on my PC if I have time.

And I will keep trying how to avoid the detection of LINE Corp. ^^

@carpedm20

AnonymousICE avatar Nov 18 '15 04:11 AnonymousICE

You can connect to to gitter via IRC Client: https://irc.gitter.im/

whitesn avatar Nov 18 '15 04:11 whitesn

@whitesn I havent use IRC before ^^|||

AnonymousICE avatar Nov 18 '15 06:11 AnonymousICE

@AnonymousICE I think I know something about ur problem..

I explored the code and noticed that the connection is reopened when a request is made I used keep-alive connection (edit LineClient and rewrite thrift's THttpClient) to solve it and as a side effect, my bot went faster.. :grinning:

btw, sorry for my english

nieltg avatar Dec 03 '15 15:12 nieltg

@AnonymousICE Sincerely thank you for this library. :smile: Is there any way to create multiple instance of LineClient? I've try this user1 = LineClient(xxx) user2 = LineClient(xxx) user1.getProfile() #this get user2 contact

Or can you tell me which class/files/module use to handle the session/token/identifier of LineClient. Thanks :+1:

benzsuankularb avatar Dec 11 '15 13:12 benzsuankularb

if you install by pip, may be you don't need think about this problem. ( if you want to use this env, so you have to find [ " folder " ] /build/~ and your xxx.py file have to put in "folder" and start. may be work~ )

minho0078 avatar Jan 08 '16 06:01 minho0078

@nieltg

Here is my FB: facebook.com/iceallen170232 Let's communicate at here ^^ My English is poor too

@benzsuankularb

I think that can work by copy the whole class "LineClient" and give it a new name like "LineClient2". Then, login the different clients like this:

user1 = LineClient(USER1_ID, USER1_PW) user2 = LineClient2(USER2_ID, USER2_PW)

I haven't try it, so I'm not sure whether it can work successfully or not.

AnonymousICE avatar Jan 12 '16 08:01 AnonymousICE

My id : adam_fahrul. Please send me BOT destroy line messenger

adamfahrul avatar Jan 10 '17 15:01 adamfahrul