Since today :
"http://gdata.youtube.com/feeds/api/videos?q=nexus&orderby=relevance&start-index=1&max-results=5&v=2&alt=jsonc&lr=fr"
Give me no results, where as "http://gdata.youtube.com/feeds/api/videos?q=nexus&orderby=relevance&start-index=1&max-results=5&v=2&alt=jsonc" does return results.
I notice it's working on my home laptop, but not on my production server. Is it possible youtube blacklist my server IP ? But I got result w/o LR parameter ......
Thanks
Ok got it,
gdata.youtube.com => has lot of IPs and 1 of range is buggy ;-(
So the solution was to edit /etc/hosts and manually enter my home youtube IP on the server.
Related
I'm developing with WebVR and I'm serving my HTML using the SimpleHTTPServer on my Mac. I want to figure out a way to access this website on my iPhone so I can see what I have created with my Google Cardboard.
I looked through a bunch of stack questions and none of them talked specifically about accessing a local website that is being served via SimpleHTTPServer
I tried getting my ip address and then concatenating the port
Ex. xxx.xx.xx.x : 8000
But it didn't work :( Also, both my phone and computer are on the same network too
Says This site can't be reached. IP_ADDRESS took not long to respond
The way I tried is the correct way. I was using school wifi so I'm assuming they're configured in a way that we aren't able to do that. Once I got home and tried on my local connection, it worked like a charm!
We are using Cloudflare on one of our sites and last week we have noticed that the site dosen`t load properly. We can see the following error in the console:
A Parser-blocking, cross-origin script,
http://ajax.cloudflare.com/cdn-cgi/nexp/dok3v=f2befc48d1/cloudflare.min.js,
is invoked via document.write. This may be blocked by the browser if
the device has poor network connectivity. See
https://www.chromestatus.com/feature/5718547946799104 for more
details.
This happens in Firefox and Chrome, since last week as new versions of these browsers came out. We have tried to contact Cloudflare, however there is no reply from them. Inspecting their code we can see the document.write and we haven`t got access to this.
Anyone came across with any solution on this?
I have a page where I am using swfobject and invoking the API's to control the youtube player.
When I run the application:
If the address is the local server (localhost) I can see all videos.
If I change the URL to my 192 internal address I get hit with the deadly restriction fail if these videos are marked as per the white and blacklists.
This seems like cheating but if I were to have a http server running on each client would this be illegal? If I could spin up an instance Cassini and now localhost solves the referrer issue.
Any thoughts?
Well, I run into the same problem and did some testing...
It seems, that Youtube restricts referers which consists of IP-Adresses.
For example, http://localhost/ works perfectly fine, no restrictions whatsoever, but with http://127.0.0.1/, bam, you're getting screwed.
Try putting
127.0.0.1 test.asd
into your hosts-file and surf to http://test.asd/. Should work fine.
So... what this means is, get yourself a domain (probably dyndns?) and everything should be fine.
I'm trying to do a HTTP GET on craigslist sfbay.craigslist.org. Here is my (ruby) code which is really simple
require 'net/http'
result = Net::HTTP.get(URI.parse('http://sfbay.craigslist.org'))
I end up getting an error "This IP has been automatically blocked."
This behaviour only happens when I try this from Amazon EC2 or on heroku. When I try again on my own computer localhost I get the correct result. Does this have to do with Amazon EC2?
I'm wondering if other people have had the same issue. What can I do to access craigslist from EC2?
I can confirm that Craigslist is blocking from the major Amazon EC2 IP ranges by IP (not by user agent). It works elsewhere, though I suspect any volume would cause other IPs to get blocked.
You could step around it with tor. More significantly, this stackoverflow question discusses data sources used by craigslist mashups.
I even tested a Brazil EC2, assuming they might not have all the CIDRs blocked. No bueno.
I'm adding Google Oauth2 to a Rails app, but have been unable to get past the early stages.
I've set up an app, and defined client ID and secret.But I'm getting Invalid parameter value for redirect_uri: Non-public domains not allowed: http://localhost/path/to/callback
What does this mean? Is this because I'm testing on a local dev environment?
Thanks for any ideas.
EDIT
This might be because the app's URI differs from the sending URI. But when I go to Google and try to authorize the path to my dev app, I get OAuth2 redirect is invalid. Is this a limitation of using a locally hosted app?
EDIT 2
The request I'm generating looks like this:
https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=###########&redirect_uri=http%3A%2F%2Fmyapp.dev%2Fusers%2Fauth%2Fgoogle_oauth2%2Fcallback&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&approval_prompt=&access_type=offline
Is this correct. I've tried this with client_id including and excluding the .apps.googleusercontent.com section. Neither seems to work.
I was getting the redirect error for my python / tornado app running on ubuntu. Using localhost didn't work as the accepted answer highlighted. Google wants a public domain.
My solution was to piggyback "example.com" which is public and create a sub domain in my /etc/hosts file. The sub domain would work on my local dev box and google would be happy with the example.com domain. I registering the redirects via the google console and the redirect worked successfully for me.
I added the following to my /etc/hosts:
192.168.33.100 devbox devbox.example.com
In my case the IP was that of my machine. I could also have used 127.0.0.1 instead.
My Google API console (https://code.google.com/apis/console) set up for a new client ID was:
"Application Type: Web Application".
Via "Your site or hostname (more options)":
In "Authorized Redirect URIs" I entered http://devbox.example.com/
In "Authorized JavaScript Origins" I entered http://devbox.example.com/
Using xip.io you can provide a public url to redirect to like http://your_pow_app.192.168.0.1.xip.io/user/auth/google_oauth2/callback
Tested and working.
I used my public hostname. It helps if you have a static IP address. I used http://www.displaymyhostname.com/ to get my hostname. I plugged it straight into the Authorized JavaScript origins field when I created a new Web Application Client ID.
P.S. My hostname looked something like this: 111.111.111.111.static.exetel.com.au
This is my answer to a related question https://stackoverflow.com/a/23517146/1320083
For anyone else finding this, my problem was combination of several things.
I could not get callbacks to work on a local machine. The console API console suggests it is possible, but I couldn't get it working. Not sure of this is down to the service, or to my network/ connection/ firewall/ etc.
In the API console you must specify the full redirect URI, not just the root url back to your app.
Google lists scope parameters here https://developers.google.com/gdata/faq#AuthScopes. It seems this information is outdated, and the correct format for these is now https://www.googleapis.com/auth/plus.me, https://www.googleapis.com/auth/youtube, etc. Maybe someone else can confirm this?
I had a few other things going on as well. I had written a full explanation on another of my questions here on SO. Unfortunately my comments were deleted instead of moved by a moderator because I posted in the wrong place. I can't now remember all that I wrote. For others facing similar issue, feel free to comment, it may jog my memory so I can offer some ideas.
Error redirect_uri_mismatch - This error can occur when you entered an incorrect bundle ID in your Google Developers Console project that does not match your app's bundle ID. Check that your client ID and bundle ID match the values that are displayed in the Developers Console.
For me it was the function that built up the google url. I put line breaks in the string, once I removed the line breaks the url worked again.
I faced this issue but found it was really not an issue. As explained in my blog you can use the public redirect URI even when you are working on your localhost development machine. Google will just return the authorization code to the public URI where you can cut and paste it to your local machine.