How Can I login Twitch via Selenium - selenium

I am trying twitch bot like a stay hydrated bot but Twitch login system have an google captcha and my bot can't login twitch I tried manually login but even i choose pictures correctly google captcha say "it was wrong try again"

Well, i think you're going to have trouble making a robot do something you can't, i'm guaranteeing the fact you cannot get past a reCaptcha is most likely user error.
Twitch Developer Documentation
You're not going to get past Google Captcha with an automation script as they're designed to stop exactly that. Also it's a really crummy way of creating a view bot, im assuming you actually are trying to do that, because if you were actually trying to make a chatbox, you'd know that twitch have things built in to support things like this, so they don't have to try and get around a reCaptcha.

Related

What is the most efficient way to automate your Instagram?

Over the past few weeks, I've spent some time researching about Instagram automation the goal being to have a program that can like and comment for me. I've come up with the following solutions:
Use a browser automation library like selenium to navigate through Instagram's website.
Cons: really botchy code that becomes useless as soon as Instagram renames their css classes which they do from time to time
Have a Android emulator running and automate that.
Cons: every instance of that emulator would require like 2 gigs of storage and would be really inefficient.
So how do for example apps on the play-/app store do it? They only have the small processing power of the phone available and still run effortless in the background.
Is there another solution that I'm missing?
The most efficient way to automate Instagram is to use the Instagram API. Using that API you can publish photos with users, tags and locations [1]. I don't find any immediate mention of Stories etc., but most likely if you work more with the API you find where/how to do that.
The also linked Instagram Platform API seems to be in a state of discontinuation.
As you tagged your question "Selenium", no, Selenium does not provide a reasonable approach for interfacing with Instagram as Selenium provides no way to make POST requests. You could try to automate the website through Selenium, but using the API is far more straightforward, less prone to layout changes and the officially sanctioned way.
[1] https://developers.facebook.com/docs/instagram-api/content-publishing
The way I did it at the end was that I used the Instagram Private API for Instagram on GitHub:
https://github.com/ping/instagram_private_api
That way I didn't have to emulate an entire device actually browsing through Instagram.

Selenium - Avoid getting CAPTCHAs

I'm trying to scrape a login-only, bot-sensitive website. After logging in, when I perform a simple selenium function like driver.find_element_by_id('button').click(), the website displays a message along the lines of We think you are a bot. Please complete the CAPTCHA below to continue.
Is there any way for me to make selenium more human-like so I don't trigger CAPTCHAs?
Hopefully not.
You are scraping, i.e. you are developing a bot, and if you try to avoid being identified as a bot, it will just be a question of time until the captcha gets improved to detect your strategy.
DonĀ“t do it. The captcha is there for a reason, which is: to detect and lockout bots!
Better check if the page you want to scrape supports an API that allows computer-to-computer communication. If there is one, use it. If there is none, suggest one, but depending on whether the web page owner wants to support your goals, or not, he might say "no".

Upload Image to Facebook Objective-C

I'm currently trying to upload an image from my Mac application to Facebook. To do this, I'd like for the user to simply input his username and password, and to click a button.
The only issue is, Facebook doesn't actually have an API for the Mac, it only has one for iOS. This shouldn't be a problem, except for the fact that to login, you must use a web view, something I'm not to keen on doing, since I'd like the interface to be two simple text fields.
I've also looked into PHFacebook, a class I found online, but it also seems to utilize an NSWebView.
I'm wondering if there's a security issue when you use text fields; indeed, it's slightly strange no available API offers this function !
So, to conclude, is it possible, or is there an API, that lets you upload an image and lets you provide the user's credentials through simple NSStrings?
There's a Cocoa framework called MKAbeFook that lets you access Facebook APIs. I don't know if it's up to date, but you should give it a try.
It looks like this is not supported unless you can embed a web browser.
If you scroll to the bottom of: facebook authentication docs, it seems to say this.
Embedding a web browser is generally doable, but may be overkill for what you are trying to do.
Good luck!
You could do this through JSON on your mac app but I think the way Facebook protocols work you simply provide the image to upload and then the user logs into their Facebook account through a webview and has to authorize it.

Do any Google Voice APIs still work?

I am interested in writing a simple CLI program that will send an SMS using Google Voice.
There are several scripts and an API or two available, but I have run into an issue that none of them seem to work any longer; as they mostly rely on parsing returned web pages.
Is anyone familiar with a current API that works so that I can send an SMS on Google Voice?
Thanks!
Looks like Google Voice changed the login procedure, and it now expects you to pass back a cookie. This issue for the Python wrapper sums it up: http://code.google.com/p/pygooglevoice/issues/detail?id=60
UPDATE AND FIX: Actually all that needs to happen is to change the login URL in your code:
Old URL - https://www.google.com/accounts/ServiceLoginAuth?service=grandcentral
New URL - https://accounts.google.com/ServiceLogin?service=grandcentral

Private viewers using the YouTube API

Has anyone been able to set who can view a private video on YouTube using the API?
The API isn't designed for this, so it's either very difficult or impossible.
You can only share a private video with 25 of your friends, so you have to first be friends with them, then give them access, which means the api would have to do all of these actions and once you hit 25 people you'd have to stop anyway.
You should probably use a different service or make your own if you want private videos.
Well you could try to load the FLV to your own website. Do a login system and use flowplayer to show it.
I've worked with the YouTube API which is pretty nice and works very smooth with jQuery and Ajax - but as the others have already mentioned there is no built-in feature for that.
You could probably find some sort of work-around as you could integrate you own authentication and login capabilites - but obviously that would not prevent your users not being able to watch the "restricted" video.