wchill / pySnap

Cross-platform Snapchat desktop client written in Python
9 stars 1 forks source link

Hi I've been following this script and I have some questions to ask. #11

Open Snowlav opened 9 years ago

Snowlav commented 9 years ago

I want to be using this script to manage a couple of accounts, the main thing it'll need to do is the following: -send snaps to ALL friends (<6000 users) within a reasonable time period -accept proxies and work through them -upload stories (with scheduler if possible) -add people (6000 at the time) within a reasonable time period -smooth working (I get a shitload of 500 internal server error codes) -track pending and accepted friends (A counter or something?) -track how many views each story gets and store it for data analysis (this might not be possible) -send text chats/snaps (this might not be possible)

I know this is a lot, and I'm wondering if there's a way to work on it maybe together? Or maybe you have these options already planned? Or just maybe, you can give some tips and advises on what I'm looking for.

I have a crappy script based on pysnap myself, but the accounts get locked while sending snaps, and while adding people I get errors like 1 every hour.

My expertise is not coding (yet, I'm working on it) but I have some basic skills. However I am a pretty good designer, and might be able to design a nice GUI if we can get this going and you are interested.

I hope to hear from you, thanks!

ertemplin commented 9 years ago

Hey @Snowlav, it sounds like you've already put a lot of work into your own project. I don't have a lot of free time to help you with your project but I can offer some suggestions.

Perhaps the 500 internal server error codes are due to you accessing Snapchat's API too quickly and they are trying to throttle the amount of requests that you are doing. If you think that's the case, then it might be worth looking into implementing exponential backoff in your script (http://en.wikipedia.org/wiki/Exponential_backoff). The main idea is that you will be reducing the rate at which your script makes API requests as you get errors from Snapchat.

It's also important to acknowledge the fact that any script or program that you create that communicates with SnapChat without their written consent is described explicitly in the Snapchat terms as a "Prohibited Activity" (https://www.snapchat.com/terms). It also sounds like you're writing a script/program which has the potential to send spammy snaps to a lot of people. I would like to personally discourage you from writing such a script because I hate getting spam on snapchat and if you reach an audience of 6000+ users, I would be surprised if Snapchat didn't attempt to ban you permanently (which is probably why you want to send snaps through a proxy).

Anyways, hope I was able to help a little bit.

Best, Eric

Snowlav commented 9 years ago

I will be looking at sending snaps through a proxy and exponential backoff , thanks a lot!

wchill commented 9 years ago

Seconding what Eric said above, while some of your concerns are valid and things I'm looking into, this code definitely was not built for that kind of automation (and with good reason).

wchill commented 9 years ago

I have a good idea of how to get all of those features working, but even so, your use case makes it seem like you'd like to implement this for a marketing bot (and given how much spam I already get on Snapchat, I don't like the idea of that). If you can either provide a valid use case and/or follow up with me on a private medium to discuss this further, I'll consider taking a look.

Snowlav commented 9 years ago

Sure. I think some validation / explanation is in place. Do you happen to know "amber alert" ? It's system that dials / texts every phone number to send out an alert when someone is missing, a suspect is on the loose or anything alike. Our neighborhood, and many others are really close, what I wanted to do is the following: -Build a platform for the alerts stated above but on a smaller scale (cat is missing, dog is missing! help!) -I found a lost coat! (kids leave and "forget" their stuff everywhere. And these above are just small things, my prototype even helped people that needed help with moving and things alike. This is not spam at all, only the users who sign up will receive snaps, and I do not plan on making a profit off of this at all as far as marketing goes. I hope to put it on my resume when it's finished, some day, though haha!

wchill commented 9 years ago

Do you happen to have any source code for this? I'd like to verify before I proceed further

Snowlav commented 9 years ago

What do you mean with source code? The lines of code I already have?

wchill commented 9 years ago

Yes.

Snowlav commented 9 years ago

Alright haha it's not much at all but I just finished some code to add people that are in my list. For adding people from a text file:

(using pysnap from github) from pysnap import Snapchat import time import random

s = Snapchat()

username = raw_input('Enter your username: ') password = raw_input('Enter your password: ') textfile = raw_input('Enter name of textfile: ') s.login(username, password)

file = open(textfile, 'r') for line in file: s.add_friend(line) print "Howdy! I have added your friend: " + line, print "Sleeping for:", randomtime = random.uniform(.5, 1) print randomtime, print "seconds" time.sleep(randomtime)

For uploading stories (because that is all I can do right now) (using another api, also on github, pysnap didn't support upload story, or I just couldn't get it to work)

from snapchat import Snapchat

s = Snapchat()

username = raw_input('Enter your username: ') password = raw_input('Enter your password: ') s.login(username, password) filename = raw_input('Enter filename: ') type = 0

media_id = s.upload(type, filename) print "Snapchats little helper to the rescue! Story uploaded with media_id:", s.add_story(media_id, time=10)

Can't find the github sources right now, but they were among the top ones.

Snowlav commented 9 years ago

right now I just put everyones username that emails me and wants to help in a list, and add it this way. Still need to figure out a way to do this when A LOT of more people will start wanting to be a part of this

Snowlav commented 9 years ago

I hope to hear from you ! :)

wchill commented 9 years ago

I will look into it.

I have previously tested for how chat works and it looks like it might integrate with the mobile platforms' push notification frameworks. While that isn't confirmed (further testing would be needed), if that is the case, it's going to be very difficult to get chat working as this implies 2-way push notification support (something I don't think has been implemented by third parties or open source libraries).

Story view analysis may be possible, but the last time I checked the data returned by the API it didn't seem like it was possible.

All other features are already planned. If you need to use proxies, you can already do that by setting the environment variables HTTP_PROXY and HTTPS_PROXY, as the requests library uses those variables internally for proxy support.

Snowlav commented 9 years ago

thanks for replying! I really appreciate it, let that be known. Is there a way I could connect to you, like skype?

Snowlav commented 9 years ago

I'd like to help wherever I can :)

Snowlav commented 9 years ago

any update on where to contact you? or where I might be able to help? :)

wchill commented 9 years ago

Unfortunately I won't be able to work on this for a few days, so please be patient

Snowlav commented 9 years ago

My apologies for being impatient. Here when you need me :)

Snowlav commented 9 years ago

Hey there, was wondering how everything is going and if I can help out in any way.

wchill commented 9 years ago

Don't worry, I haven't forgotten, but finals are approaching and it's imperative I focus on those. I have some code that's in the pipeline for this though.

On Mon, Dec 8, 2014 at 5:44 PM, Snowlav notifications@github.com wrote:

Hey there, was wondering how everything is going and if I can help out in any way.

— Reply to this email directly or view it on GitHub https://github.com/wchill/pySnap/issues/11#issuecomment-66210091.

Eric Ahn University of Illinois @ Urbana-Champaign '17

Snowlav commented 9 years ago

Hey, thank you for the quick reply. I wish you the best of luck with your finals and appreciate everything you're doing :)

BTW I had found some contacts on odesk that where willing to answer some of my questions and one of them told me there was big API update coming in January, I'm not sure if that is true but do you happen to know anything about it? I kinda felt my project was doomed when I heard that.

wchill commented 9 years ago

I have not. Though I wouldn't worry about it, as Snapchat versions their APIs so what I'm implementing should work for at least the foreseeable future.

Snowlav commented 9 years ago

I hope your finals are going great :) BTW I did some research into the updates that are supposed to be coming and it seems they are now using a newer key, and other endpoints such as /loq/ . But I saw you already had that endpoint in a file.

Are you aware on the new key?

Snowlav commented 9 years ago

@wchill I hope you are doing ok, how is the project going? We have been hitting a huge roadblock, both 3rd party detection and network getting blocked when multiple users start using the platform.

Have you encountered these problems / any idea on how to deal with them ?

Thanks!