I'm trying to login automatically in tumblr, running the script proposed here but phantomjs only shows failed attempts:
[info] [phantom] Starting...
[info] [phantom] Running suite: 3 steps
[debug] [phantom] opening url: https://tumblr.com/login, HTTP GET
[debug] [phantom] Navigation requested: url=https://tumblr.com/login, type=Other,willNavigate=true, isMainFrame=true
[warning] [phantom] Loading resource failed with status=fail: https://tumblr.com/login
[debug] [phantom] Successfully injected Casper client-side utilities
[debug] [phantom] Logging in
[info] [remote] attempting to fetch form element from selector: '#signup_form'
[info] [phantom] Step anonymous 2/3: done in 2899ms.
[info] [phantom] Step _step 3/3: done in 2912ms.
[warning] [phantom] Casper.waitFor() timeout
[error] [phantom] Wait timeout of 100000ms expired, exiting.
Wait timeout of 100000ms expired, exiting.
I increased the original timeout script without success, my workstation uses: - Windows 7 64bits - Casperjs 1.1.0 - Phantomjs 1.9.1
thanks.
To be able to load this URL, add all domains and sub-domains of your app to the App Domains field in your app settings.
In the "Facebook Login" tab under your app, enter all valid callback URL's, such as http://localhost/callback, http://productionUrl/callback, etc. If you don't see "Facebook Login" tab under your app, click "Add Product-> Facebook Login->Get Started" Enter the Valid Callback Urls -> Save changes.
In the App Dashboard, choose your app and scroll to Add a Product Click Set Up in the Facebook Login card. Select Settings in the left side navigation panel and under Client OAuth Settings, enter your redirect URL in the Valid OAuth Redirect URIs field for successful authorization.
A valid redirect URI is the URI within your application where Facebook will send you “stuff.” Meaning, the URI within your application where Facebook may send you an authorization code and an access token.
I finally found a solution for this issue. Tumblr is using the TLSv1.2 encryption for their site while PhantomJS defaults to SSLv3.
To fix this, you can either call CasperJS with either:
casperjs tumblr.js --ssl-protocol=tlsv1
or
casperjs tumblr.js --ssl-protocol=any
With my version of casperjs and phantomjs, the cli ssl protocol parameter was being ignored, I had to put it in a config file instead:
casperjs browse.js --config=<(echo '{"sslProtocol": "any"}') --ignore-ssl-errors=true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With