yql

Is it possible to add UserAgent to YQL?

筅森魡賤 提交于 2019-12-08 05:35:48
问题 I'm using cross-domain-ajax in which, YQL is being used. It has this line in it: query = 'select * from html where url="{URL}" and xpath="*"'; so I added user-agent to it like this below: query = 'select * from html where url="{URL}" and xpath="*" and ua="Mozilla/5.0 (Linux; U; Android 4.0.1; ja-jp; Galaxy Nexus Build/ITL41D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30"'; Now it won't return the value any more :( My main javascript is this: url = 'http:/

Looking for help with YQL movie showtimes

淺唱寂寞╮ 提交于 2019-12-08 03:47:16
问题 I had been using the undocumented Yahoo movies API until it was pulled a few days ago, so I'm looking for another way to retrieve local movie showtimes (ideally by theater). I found this thread about YQL datatables on SO, and the last post looked really promising. I just can't seem to figure out how to query the data to return local movies and showtimes. I've been trying variations on "SELECT * from movies.showtimes where location='myzip'" with no success. Any ideas? 回答1: select * from movies

How to get the formatted view of YQL as result?

一个人想着一个人 提交于 2019-12-08 03:32:26
YQL gives out result only in tree view. Is there any way to get the result in Formatted view?? Use an XSLT stylesheet to create a formatted view. Here is an example for an RSS feed: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="XML" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system=http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd indent="yes"/> <xsl:template match='//channel'> <page> <content> <module> <header layout="simple"> <layout-items> <block class=

How to implement YQL in Java? [closed]

≡放荡痞女 提交于 2019-12-07 13:22:57
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Hey what do I have to do to implement the Yahoo Query Language in Java? Or is this generally possible? I want to parse the JSON after that. 回答1: YQL is interpreted server-side, so there's not much to do in Java. I'd just make a URL, open it, and read the data stream. Just copy the PHP example code, mostly:

Help creating a YQL Query to search companies

百般思念 提交于 2019-12-06 23:39:12
How can I create a YQL Query that will return me companies from Yahoo Finance? select * from yahoo.finance.quotes where name like "apple" Doesn't work. That won't work for many reasons. Please try: select * from html where url="http://finance.yahoo.com/d/quotes.csv?s=AAPL&f=snl1d1t1ohgdr" To get exactly what you want, you could further filter with xpath in the where clause. To get a symbol of any company you can use the below url : http://d.yimg.com/autoc.finance.yahoo.com/autoc?query=<company name>&callback=YAHOO.Finance.SymbolSuggest.ssCallback here in the query you can pass any company name

Python HTTP Error 505: HTTP Version Not Supported

跟風遠走 提交于 2019-12-06 21:13:59
I have the following code: import re from re import sub import cookielib from cookielib import CookieJar import urllib2 from urllib2 import urlopen cj = CookieJar() opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) opener.addheaders=[('user-agent' , 'Safari/7.0.2')] def check(word): try: query = "select * from geo.places where text ='"+word+"'" sourceCode=opener.open('http://query.yahooapis.com/v1/public/yql?q='+query+'&diagnostics=true').read() print sourceCode except Exception, e: print str(e) print 'ERROR IN MAIN TRY' myStr = ['I','went','to','Boston'] for item in myStr: check

How to process an object literal?

眉间皱痕 提交于 2019-12-06 11:49:45
I am new to Javascript and trying to extract some text stored in an object. The object is defined as an object literal and is passed to a function in a Javascript script that calls the function. The script (and object) have this structure: foo({ "query": { "count": "2", "created": "2009-07-25T08:17:54Z", "lang": "en-US", }, "results": { "result": [ { "abstract": "<b>Pizza</b> Hut®. Order Online for Delivery or Carry-out. Fast & Easy.", "title": "<b>Pizza</b> Hut" }, { "abstract": "Official site of Domino's <b>Pizza</b> delivery chain, which offers thin crust, deep dish, and hand tossed <b

Yahoo Pipes: filter items in a feed based on words in a text file

∥☆過路亽.° 提交于 2019-12-06 09:17:19
I have a pipe that filters an RSS feed and removes any item that contains "stopwords" that I've chosen. Currently I've manually created a filter for each stopword in the pipe editor, but the more logical way is to read these from a file. I've figured out how to read the stopwords out of the text file, but how do I apply the filter operator to the feed, once for every stopword? The documentation states explicitly that operators can't be applied within the loop construct, but hopefully I'm missing something here. You're not missing anything - the filter operator can't go in a loop. Your best bet

How to implement YQL in Java? [closed]

笑着哭i 提交于 2019-12-06 03:15:01
Hey what do I have to do to implement the Yahoo Query Language in Java? Or is this generally possible? I want to parse the JSON after that. YQL is interpreted server-side, so there's not much to do in Java. I'd just make a URL, open it, and read the data stream. Just copy the PHP example code , mostly: String baseUrl = "http://query.yahooapis.com/v1/public/yql?q="; String query = "select * from upcoming.events where location='San Francisco' and search_text='dance'"; String fullUrlStr = baseUrl + URLEncoder.encode(query, "UTF-8") + "&format=json"; URL fullUrl = new URL(fullUrlStr); InputStream

How to get ajax response from other domain?

我与影子孤独终老i 提交于 2019-12-05 06:40:26
问题 Except YQL ,Is there any way to get ajax's response and data from other domain without modifying server side's code? YQL has limit (1000 calls per hour) for free user , but most of people said it's actually less. 回答1: If what you mean by "without modifying server side's code" is not modifying the server of the data source, then you can have your own proxy server (basically making your own YQL server) to read the remote data. This is possible because the server-side is not bound to the Same