Giter Club home page Giter Club logo

Comments (6)

alexbarber avatar alexbarber commented on June 23, 2024

I'm getting the same issue: "Cannot call method 'replace' of undefined" - did Yahoo change how things work on their end again?

from jquery.fn.

padolsey avatar padolsey commented on June 23, 2024

May I ask what pages are you requesting?

This doesn't occur for me, on e.g. $.get('http://google.com', function(){...}).

If this is occurring I would guess that it's because YQL wasn't able to get any results. I can only help if you give me more details about the specifics of your issue :)

from jquery.fn.

alexbarber avatar alexbarber commented on June 23, 2024

I've used it with success previously on the blog on
http://www.arthurmeyerson.com

The main site runs in django CMS. On the blog, which runs on WordPress, I
make a call to the main site to scrape the nav with dropdowns at the top of
the page, and then paint that nav in the blog. I do this since the main
site dropdowns change from time to time as photo categories can change.

Now that call returns nothing, so I wondered if something shifted in YQL.

Alex
// ab // alexbarber.com

On Sat, Nov 12, 2011 at 4:06 AM, James Padolsey <
[email protected]

wrote:

May I ask what pages are you requesting?

This doesn't occur for me, on e.g. $.get('http://google.com', function(){...}).

If this is occurring I would guess that it's because YQL wasn't able to
get any results. I can only help if you give me more details about the
specifics of your issue :)


Reply to this email directly or view it on GitHub:

https://github.com/jamespadolsey/jQuery-Plugins/issues/11#issuecomment-2716868

from jquery.fn.

libricoleur avatar libricoleur commented on June 23, 2024

Getting the same issue while it used to work just fine. I can read from my web server's logs that YQL gets the page:

217.146.191.19 kar.chezmandre.net - [13/Nov/2011:00:51:39 +0100] "GET /pub/whoisonchat.pih HTTP/1.0" 200 588 "-" "Mozilla/5.0 (compatible; Yahoo Pipes 2.0; +http://developer.yahoo.com/yql/provider) Gecko/20090729 Firefox/3.5.2"

But data.results[0] is undefined. Tried to switch between jQuery versions with no success, so I guess it's a YQL issue.
BTW I use it like this:

$('#mycontainer').load('http://kar.chezmandre.net/pub/whoisonchat.pih #maindiv');

from jquery.fn.

padolsey avatar padolsey commented on June 23, 2024

Please have a look at http://developer.yahoo.com/yql/console

Here you can type in your query -- which is essentially what this plugin is doing.

i.e.

SELECT * FROM html WHERE url = "http://YOUR-URL.COM"

YQL will provide you with the results, or errors if it encountered any.

from jquery.fn.

libricoleur avatar libricoleur commented on June 23, 2024

Thank you for your help! I didn't know about this tool.
I finally got it to work again. The YQL console's JSON output returned with a null "results" field. I eventually found out it was because of an encoding conflict. The HTTP header said the encoding was ascii while the page had as first line. Removing that line made both the console and the plugin get the page. I don't really like it since I have different encodings on different pages and I think some scripts will break if I change the coding server-side. I'll give it a try. Anyway, I wonder if that's a bug or a wanted new YQL behavior?
Thank you very much once again!

EDIT: I found how to set the encoding field in the HTTP header from my script. Now everything work just fine!

from jquery.fn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.