carpedm20 / LINE

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

If you have questions #11

Open carpedm20 opened 9 years ago

carpedm20 commented 9 years ago

Maybe I or others can help you from here

Jirayouth commented 9 years ago

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 : jirayouthp@gmail.com

rconnellii commented 9 years ago

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

carpedm20 commented 9 years ago

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.

webbhlin commented 9 years ago

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

ArnonHongklay commented 8 years ago

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

AnonymousICE commented 8 years ago

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

whitesn commented 8 years ago

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

Jirayouth commented 8 years ago

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

AnonymousICE commented 8 years ago

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

whitesn commented 8 years ago

@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

AnonymousICE commented 8 years ago

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

whitesn commented 8 years ago

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

AnonymousICE commented 8 years ago

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

whitesn commented 8 years ago

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

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

whitesn commented 8 years ago

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

AnonymousICE commented 8 years ago

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

whitesn commented 8 years ago

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.

AnonymousICE commented 8 years ago

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

whitesn commented 8 years ago

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

AnonymousICE commented 8 years ago

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

@carpedm20

whitesn commented 8 years ago

@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 :)

AnonymousICE commented 8 years ago

@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

whitesn commented 8 years ago

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

AnonymousICE commented 8 years ago

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

nieltg commented 8 years ago

@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

benzsuankularb commented 8 years ago

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

minho0078 commented 8 years ago

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~ )

AnonymousICE commented 8 years ago

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

adamfahrul commented 7 years ago

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

monhustla commented 7 years ago

A bit late to the conversation but I would love to rent a group protect bot from someone if they have the bot made. Please pm here if you have the framework for one.

nirawan314 commented 7 years ago

C:\LINE\LINE>python examples\bot.py Login Failed Traceback (most recent call last): File "examples\bot.py", line 14, in for op in user.longPoll(): NameError: name 'user' is not defined

how to fix? help me please my id: vplvrs

ii64 commented 7 years ago

@nirawan314 its not get any error if u not edit file

reccaz910 commented 7 years ago

Hello to all im new to this Line app, i made a group community for Last day on earth survival game and i have 273 members now but i want some protection on those kickers, can you guys help me please to setup some bots to my community.. my line id is reccaz_10 thanks guys

rahul81281 commented 7 years ago

Hey guys can you give me tutorials to create bot protection group please. My line id is spidy81

davidsyahfallen commented 6 years ago

Hello... Anyone..how to make bot protection? Help me please.. my group always attacking by kicker Id line : khalik02

cahyadarma30 commented 6 years ago

lol im using a vps to running my bots anyone want to join?

Ikzirdtm commented 6 years ago

help me for making bot protect in line messenger id: astical

RYUVIE commented 6 years ago

Can somebody here help me for make some bot protection ??