yahoo - YQL Losing HTML Element Attributes? -
yahoo - YQL Losing HTML Element Attributes? -
yql console link
query:
select * html url='http://www.cbs.com/shows/big_brother/video/' , xpath='//div[@id="cbs-video-metadata-wrapper"]/div[@class="cbs-video-share"]/a' returns:
<?xml version="1.0" encoding="utf-8"?> <query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="1" yahoo:created="2011-07-09t23:14:02z" yahoo:lang="en-us"> <diagnostics> <publiclycallable>true</publiclycallable> <url execution-time="146" proxy="default"><![cdata[http://www.cbs.com/shows/big_brother/video/]]></url> <user-time>163</user-time> <service-time>146</service-time> <build-version>19262</build-version> </diagnostics> <results> <a class="twitter-share-button" href="http://twitter.com/share"/> </results> </query> should homecoming similar to:
<results> <a href="http://twitter.com/share" data-url="http://www.cbs.com/shows/big_brother/video/2045825951/big-brother-episode-1" class="twitter-share-button"></a> </results> if out query 1 level, totally strips out element, utilize info need.
we have new html parser recognizes custom attributes now.
add compat="html5" trigger new parser.
e.g.:
select * html url = "http://mydomain.com" , compat="html5" yahoo yql yahoo-pipes
Comments
Post a Comment