CSS version

What CSS version is supported by the CSS selector in the Feed Creator?
I need to extract date from

11/5/15

item_date=[nowrap=“nowrap”] does not work
as well as item_date=[class~=“recordListDate”]
and item_date=.span1 col-xs-1 recordListDate

Thank you!

Hi Boris,

We rely on Zend Frameworks’s CSS to XPath class. You can see it here: https://bitbucket.org/fivefilters/full-text-rss/src/8f5d813459ebe822330e21662649353732159dc6/libraries/Zend/Dom/Query/Css2Xpath.php

The functions transform() and _tokenize() should give you an idea of what it supports. These should work, in addition to id/class selectors:

// Child selectors
e.g. div > p > a

// arbitrary attribute strict equality
e.g. div[width = “400”]

// arbitrary attribute contains full word
e.g. div[class ~= “main”]

// arbitrary attribute contains specified content
e.g. div[href *= “articles/”]

Of course you’ll have to URL encode these first.

So you should be able to select this element with item_date=td.recordListDate

A few things to bear in mind:

  • The way we parse the HTML might not always match the way your browser does. So sometimes the CSS selector is correct for the DOM tree produced by your browser, but not for the one produced by Feed Creator (in such cases using our HTML5 parser will often help - so try changing the parser with the parser parameter: parser=html5

  • We rely on PHP’s strtotime to parse dates. If the format is too ambiguous or not recognisable, then we can’t use it. See http://php.net/manual/en/function.strtotime.php

Hope that’s some help.

I need to extract the date from

23 Nov 15

item_date=div.views-field-created does not work…

Thanks

Jeff

Hi Jeff, if you give us more information (URL, other parameters you’re using) we can see if we can help.