GithubHelp home page GithubHelp logo

usametov / fizzler Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 540 KB

Automatically exported from code.google.com/p/fizzler

License: GNU General Public License v3.0

Batchfile 0.27% C# 99.60% HTML 0.13%

fizzler's People

Contributors

colinramsay avatar usametov avatar

Watchers

 avatar

Forkers

karpatsky

fizzler's Issues

Class selector return duplicated node collection

What steps will reproduce the problem?
1. Load this : http://read.mangashare.com/20th-Century-Boys to a HtmlDocument
2. do this : doc.DocumentNode.QuerySelectorAll("table.datalist > tr.datarow")
3.or this : doc.DocumentNode.QuerySelectorAll(".datalist > .datarow")

What is the expected output? What do you see instead?
I expect to get a node collection without any duplication, because with just 
HTMLAgilityPack it does exactly that, although it's more difficult. I see a lot 
of duplicated node on the returned collection.


What version of the product are you using? On what operating system?
Fizzler 1.0.0, Win7 x64, VS 2010

Original issue reported on code.google.com by [email protected] on 18 Nov 2010 at 8:03

Attachments:

Parse attributes with :

Be able to parse attributes in an element that contain : (colon) in it.

Example
document.QuerySelectorAll("meta[property=og:url]")

to find
<meta property="og:url" content="" />

Many website use this because of Facebook

Original issue reported on code.google.com by [email protected] on 27 Oct 2011 at 3:39

Add a console wrapper for Fizzler

Add a console application that uses Fizzler to provide the following services:

- Query the nodes of an HTML document from stdin using a CSS selector given
as a command-line arg.
- Get a human readable description of a CSS selector given as a
command-line arg.

Original issue reported on code.google.com by azizatif on 29 Apr 2009 at 9:36

Support nth-of-type pseudo-class selector

What new or enhanced feature are you proposing?

The :nth-of-type(an+b) pseudo-class notation represents an element that has
an+b-1 siblings with the same expanded element name before it in the
document tree, for a given zero or positive integer value of n, and has a
parent element. In other words, this matches the bth child of that type
after all the children of that type have been split into groups of a
elements each. 

What goal would this enhancement help you achieve?

Greater CSS Selectors Level 3 compliance.

For more information, see:
http://www.w3.org/TR/css3-selectors/#nth-last-child-pseudo

Original issue reported on code.google.com by azizatif on 14 May 2009 at 11:42

Add user-agent header customization support to Visual Fizzler

What new or enhanced feature are you proposing?

Allow VisualFizzler to customize the User-Agent header that it uses to 
download a resource when using the Import From Web option from the File 
menu.

What goal would this enhancement help you achieve?

Some web sites serve different content based on the User-Agent header and 
this means that Visual Fizzler may see different HTML than when using a 
browser. As a result, testing a CSS selector in Visual Fizzler may give 
different results when the same selector is applied in a different agent. 
By adding an option to customize the User-Agent header, Visual Fizzler can 
be configured to retrieve the same HTML an arbitrary browser version.

Original issue reported on code.google.com by azizatif on 19 Oct 2009 at 2:38

Support general sibling combinator

The general sibling combinator is made of the "tilde" (U+007E, ~) character
that separates two sequences of simple selectors. The elements represented
by the two sequences share the same parent in the document tree and the
element represented by the first sequence precedes (not necessarily
immediately) the element represented by the second one.

Example:

  h1 ~ pre

represents a pre element following an h1. It is a correct and valid, but
partial, description of:

<h1>Definition of the function a</h1>
<p>Function a(x) has to be applied to all figures in the table.</p>
<pre>function a(x) = 12x/13.5</pre>

Original issue reported on code.google.com by azizatif on 28 Apr 2009 at 12:16

HumanReadableSelectorGeneratorTests.Three_Levels_Of_Descendant fails

What steps will reproduce the problem?

1. Run all unit tests

What is the expected output? What do you see instead?

Expected all tests to pass. Instead Three_Levels_Of_Descendant fails. See
attached file for more details.

Please use labels and text to provide additional information.

Using r138.

Original issue reported on code.google.com by azizatif on 29 Apr 2009 at 4:21

Attachments:

Support nth-last-child pseudo-class selector

What new or enhanced feature are you proposing?

The :nth-last-child(an+b) pseudo-class notation represents an element that
has an+b-1 siblings after it in the document tree, for a given positive
integer or zero value of n, and has a parent element.

What goal would this enhancement help you achieve?

Greater CSS Selectors Level 3 compliance.


Original issue reported on code.google.com by azizatif on 14 May 2009 at 11:39

QuerySelectorAll on HtmlNode for FORM returns 0 nodes child INPUTs

What steps will reproduce the problem?

1. var nodes = formNode.QuerySelectorAll("textarea,input,button,select");
2. Console.WriteLine(nodes.Count());

What is the expected output? What do you see instead?

The method should return all child nodes of "formNode" matching the CSS 
selector. 0 nodes are returned at the moment.

Original issue reported on code.google.com by asbjornu on 6 May 2009 at 2:31

Support negation pseudo-class selector

What new or enhanced feature are you proposing?

The negation pseudo-class, :not(X), is a functional notation taking a
simple selector (excluding the negation pseudo-class itself and
pseudo-elements) as an argument. It represents an element that is not
represented by the argument.

Examples:

The following selector matches all button elements in an HTML document that
are not disabled.

button:not([DISABLED])

The following selector represents all but FOO elements.

*:not(FOO)

What goal would this enhancement help you achieve?

Greater CSS Selectors Level 3 compliance.

For more information, see:
http://www.w3.org/TR/css3-selectors/#negation

Original issue reported on code.google.com by azizatif on 14 May 2009 at 11:51

NAnt build script does not build 2.0 targets

What steps will reproduce the problem?

1. Check out the sources
2. Build using Visual Studio solution
3. Build using NAnt and the supplied default.build

What is the expected output? What do you see instead?

Expect that Visual Studio solution and NAnt build script to build all
projects identically, including those that target .NET Framework 2.0 using
BackLINQ. Instead, NAnt build script builds only binaries that require 
.NET Framework 3.5.

Additional information:

Revision tested: r184

Original issue reported on code.google.com by azizatif on 6 May 2009 at 9:43

Implicit universal selector with attributes yields no results

What steps will reproduce the problem?

Run tests with attached patch applied, which exercises the selector case:
[class="checkit"]

What is the expected output? What do you see instead?

Expected 2 div elements with class checkit to be selected.
Instead, none are selected.

Original issue reported on code.google.com by azizatif on 21 Apr 2009 at 10:27

Attachments:

Support ID selectors with ":" in the middle

Hi,
On one of the Apple sites I have the following span I try to select:
<span id="theForm:slsERRtable">
There seems to be no way to do it using Fizzler.
The Id is valid (http://www.w3schools.com/tags/att_standard_id.asp)
I've tried the followings:
- span#theForm:slsERRtable : System.FormatException: Unknown pseudo-class 
'slsERRtable'.
- span#theForm\:slsERRtable : System.FormatException: Invalid character at 
position 13. 
(http://stackoverflow.com/questions/122238/handling-a-colon-in-an-element-id-in-
a-css-selector)
- span#theForm:\3AslsERRtable ul li : System.FormatException: Invalid character 
at position 14.
Thanks,
Corneliu.

Original issue reported on code.google.com by [email protected] on 28 Feb 2011 at 9:18

Nant Build Fails on OSX

What steps will reproduce the problem?
1. Update to revision 184.
2. Run nant in the project dir
3. Build fails

What is the expected output? What do you see instead?

build-consolefizzler:

      [csc] Compiling 10 files to
'/Users/colinramsay/Downloads/fizzler/fizzler-read-only/build/fizz.exe'.
      [csc]
/Users/colinramsay/Downloads/fizzler/fizzler-read-only/ConsoleFizzler/Command.cs
(31,28):
error CS0103: The name `ConfigurationManager' does not exist in the current
context
      [csc]
/Users/colinramsay/Downloads/fizzler/fizzler-read-only/ConsoleFizzler/Command.cs
(32,52):
error CS1928: Type `object' does not contain a member `Narrow' and the best
extension method overload
`ConsoleFizzler.NameValueCollectionExtensions.Narrow(this
System.Collections.Specialized.NameValueCollection, string)' has some
invalid arguments
      [csc]
/Users/colinramsay/Downloads/fizzler/fizzler-read-only/ConsoleFizzler/NameValueC
ollectionExtensions.cs(40,43):
(Location of the symbol related to previous error)
      [csc]
/Users/colinramsay/Downloads/fizzler/fizzler-read-only/ConsoleFizzler/Command.cs
(32,52):
error CS1929: Extension method instance type `object' cannot be converted
to `System.Collections.Specialized.NameValueCollection'
      [csc]
/Users/colinramsay/Downloads/fizzler/fizzler-read-only/ConsoleFizzler/Command.cs
(33,25):
error CS1502: The best overloaded method match for
`ConsoleFizzler.CommandLine.ParseTo(System.Collections.Generic.IEnumerable<strin
g>,
object)' has some invalid arguments
      [csc]
/Users/colinramsay/Downloads/fizzler/fizzler-read-only/ConsoleFizzler/CommandLin
e.cs(54,32):
(Location of the symbol related to previous error)
      [csc]
/Users/colinramsay/Downloads/fizzler/fizzler-read-only/ConsoleFizzler/Command.cs
(33,25):
error CS1503: Argument `#1' cannot convert `object' expression to type
`System.Collections.Generic.IEnumerable<string>'
      [csc] Compilation failed: 5 error(s), 0 warnings

BUILD FAILED - 0 non-fatal error(s), 7 warning(s)

/Users/colinramsay/Downloads/fizzler/fizzler-read-only/default.build(41,4):
External Program Failed:
/Library/Frameworks/Mono.framework/Versions/2.0.1/lib/mono/2.0/gmcs.exe
(return code was 1)

Original issue reported on code.google.com by info%[email protected] on 5 May 2009 at 4:56

Inner HTML empty?

Hi I have this simple initialization code,

   HtmlDocument html = new HtmlDocument();
            html.LoadHtml(new WebClient().DownloadString(_url));

            var document = html.DocumentNode;

then I do this

     List<HtmlNode> nodes = document.QuerySelectorAll("select[name=chapter]").ToList<HtmlNode>();
            List<HtmlNode> chapterList = nodes[0].QuerySelectorAll("option").ToList<HtmlNode>();

it returns the nodes just fine correct length and all but, One problem is when 
I do

chapterList[0].innerHTML

this is empty, when its really not? 

Any one can fix this ? Or any can provide any work around,

Original issue reported on code.google.com by [email protected] on 15 Aug 2011 at 1:54

Support namespace qualification in element and attribute names

What new or enhanced feature are you proposing?

Add support for namespace qualification in element and attribute names. See:

- http://www.w3.org/TR/css3-selectors/#typenmsp
- http://www.w3.org/TR/css3-selectors/#attrnmsp

What goal would this enhancement help you achieve?

It would help achieve greater CSS Selectors Level 3 compliance.

Original issue reported on code.google.com by azizatif on 8 May 2009 at 1:49

Consider SgmlReader as alternative default to HtmlAgilityPack

What new or enhanced feature are you proposing?

Fizzler tools like Visual Fizzler rely on HtmlAgilityPack as the default
implementation. However, the HtmlAgilityPack project seems to have gone
stale at the moment and has a few bugs pending that are also affecting CSS
selection via Fizzler. Consider a more robust default alternative.

What goal would this enhancement help you achieve?

It would make Fizzler look less buggy. :)

Original issue reported on code.google.com by azizatif on 6 May 2009 at 3:22

Support for IWebBrowser

I've implemented support for IWebBrowser in order to easily query active
documents without sucking out the HTML into agility pack.  This is useful
for me because sometimes I want to do things with the resultant elements,
like simulate a click on them, and if they don't have id's, mapping between
agility pack and IHTMLElement isn't easy.  So the attached files do this,
and rely on the csExWb library for the COM declarations of the IHTMLElement
types.  Hope it's useful to someone.

Original issue reported on code.google.com by [email protected] on 29 Sep 2009 at 7:43

Attachments:

Multiple-selector doesn't return elements in document order

http://api.jquery.com/multiple-selector/ states that for a multiple-selector 
"The order of the DOM elements in the returned jQuery object ... will be in 
document order."

Fizzler doesn't respect this order, instead returning all the matches for each 
selector in turn and not in document order.


Original issue reported on code.google.com by [email protected] on 16 Jan 2011 at 8:48

Custom function callout selectors

I've implemented a new selector: "?=" which calls out to a custom delegate
passing the element and the name/value (i.e. both sides of ?=) for more
complex element analysis.  If there's interest, I'll zip it up and upload.

Original issue reported on code.google.com by [email protected] on 30 Sep 2009 at 4:23

Mono build

I'm not even sure if this is possible but I'd like to get us building under
Mono. This may involve switching the default HTML parser to something which
works under mono.

Original issue reported on code.google.com by info%[email protected] on 27 Apr 2009 at 10:07

Support only-of-type pseudo-class selector

What new or enhanced feature are you proposing?

Represents an element that has a parent element and whose parent element
has no other element children with the same expanded element name. Same as
:first-of-type:last-of-type or :nth-of-type(1):nth-last-of-type(1), but
with a lower specificity.

What goal would this enhancement help you achieve?

Greater CSS Selectors Level 3 compliance.

For more information, see:
http://www.w3.org/TR/css3-selectors/#only-of-type-pseudo

Original issue reported on code.google.com by azizatif on 14 May 2009 at 11:48

Support first-of-type pseudo-class selector

What new or enhanced feature are you proposing?

Same as :nth-of-type(1). The :first-of-type pseudo-class represents an
element that is the first sibling of its type in the list of children of
its parent element.

What goal would this enhancement help you achieve?

Greater CSS Selectors Level 3 compliance.

For more information, see:
http://www.w3.org/TR/css3-selectors/#first-of-type-pseudo

Original issue reported on code.google.com by azizatif on 14 May 2009 at 11:45

Add NAnt to repository

What new or enhanced feature are you proposing?

Add NAnt binaries and supporting files to the repository.

What goal would this enhancement help you achieve?

Make a checkout self-contained along with the right versions of required
tools rather than relying on the ones installed on the working machine.

Original issue reported on code.google.com by azizatif on 6 May 2009 at 9:34

Support link and dynamic pseudo-classes

What new or enhanced feature are you proposing?
Fizzler throws an exception of it encounters :link, :hover, :active, :visited 
or :focus pseudo-classes. I think it's better to ignore them rather than throw 
as they do not depend on DOM structure.

http://www.w3.org/TR/CSS21/selector.html#dynamic-pseudo-classes

What goal would this enhancement help you achieve?
Parse existing CSS files.

Original issue reported on code.google.com by [email protected] on 18 Sep 2011 at 8:51

Attachments:

Incorrect human readable text for ID selector

What steps will reproduce the problem?
1. Run Visual Fizzler
2. Type in #foo for selector

What is the expected output? What do you see instead?

The description reads, "Select all nodes." Expected to see something along
the lines of what is produced when you enter the equivalent [id=foo]. That
is, "Select all nodes which have a id attribute with a value of 'foo'."

Please use labels and text to provide additional information.

Using r125.

Original issue reported on code.google.com by azizatif on 29 Apr 2009 at 9:11

Support last-of-type pseudo-class selector

What new or enhanced feature are you proposing?

Same as :nth-last-of-type(1). The :last-of-type pseudo-class represents an
element that is the last sibling of its type in the list of children of its
parent element.

What goal would this enhancement help you achieve?

Greater CSS Selectors Level 3 compliance.

For more information, see:
http://www.w3.org/TR/css3-selectors/#last-of-type-pseudo

Original issue reported on code.google.com by azizatif on 14 May 2009 at 11:47

Strong key signed libraries

It would be nice if all Fizzler assemblies intended or external 
comsumption, like Fizzler.* and Fizzler.Systems.* were strong-key signed 
so they could be referenced from other strong-key signed libraries.

Original issue reported on code.google.com by asbjornu on 30 Apr 2009 at 10:43

NAnt build script does not build release configurations

What steps will reproduce the problem?

1. Check out the sources
2. Build using Visual Studio solution
3. Build using NAnt and the supplied default.build

What is the expected output? What do you see instead?

Expect that Visual Studio solution and NAnt build script to build debug and
release configurations of all projects. Instead, NAnt build script builds
only binaries in debug mode.

Additional information:

Revision tested: r184

Original issue reported on code.google.com by azizatif on 6 May 2009 at 9:41

Support prefix matching attribute selector

Add [att^=val], which represents an element with the att attribute whose
value begins with the prefix "val". If "val" is the empty string then the
selector does not represent anything.

Original issue reported on code.google.com by azizatif on 28 Apr 2009 at 12:08

Universal selector ignores attributes

What steps will reproduce the problem?

Run tests with attached patch applied, which exercises the selector case:
*[class="checkit"]

What is the expected output? What do you see instead?

Expected 2 div elements with class checkit to be selected.
Instead, all elements are selected.

Original issue reported on code.google.com by azizatif on 21 Apr 2009 at 10:32

Attachments:

Calculate the specificity of a given selector

Would it be possible to calculate the specificity of a given selector based
on the W3 specification 

http://www.w3.org/TR/CSS2/cascade.html#specificity

There is a ruby project that does this and I think it would be a handy feature.

http://code.dunae.ca/css_parser/

CssParser.calculate_specificity('#content div p:first-line a:link') 
=> 114

My goal is to be able to take an html document and parse it applying all
the css styles inline on the actual elements. This is useful in getting
good email rendering results and I got the idea from premailer 

http://premailer.dialect.ca/

Original issue reported on code.google.com by [email protected] on 29 Oct 2009 at 1:28

Visual Fizzler doesn't actually perform matching

What steps will reproduce the problem?
1. Import http://colinramsay.co.uk from web
2. Enter "title" in the selector box

What is the expected output? What do you see instead?
Expect to see the <title> node matched, instead nothing is matched.

This is with revision 129.

Original issue reported on code.google.com by info%[email protected] on 29 Apr 2009 at 11:37

Descendant Human Readable Selector is wrong

What steps will reproduce the problem?
1. fizz.exe explain "p a"

What is the expected output? What do you see instead?
Expected: "Select <a> which are descendants of <p>."
But was:  "Select <p> whose descendant is <a>."

Please use labels and text to provide additional information.
The ordering is the wrong way round, we are saying that the parent is
selected when in fact it is the child that is selected.

Original issue reported on code.google.com by info%[email protected] on 15 May 2009 at 12:43

Support suffix matching attribute selector

Add [att$=val], which represents an element with the att attribute whose
value ends with the suffix "val". If "val" is the empty string then the
selector does not represent anything.

Original issue reported on code.google.com by azizatif on 28 Apr 2009 at 12:09

NAnt build script builds to the wrong directory

What steps will reproduce the problem?
1. Check out the sources
2. Build using Visual Studio solution
3. Build using NAnt and the supplied default.build

What is the expected output? What do you see instead?

Expect that Visual Studio solution and NAnt build script place binaries
under the bin directory. Instead, NAnt build script builds binaries to a
directory called build.

Additional information:

Revision tested: r184


Original issue reported on code.google.com by azizatif on 6 May 2009 at 9:37

Remove dependency on BackLINQ assembly

Include BackLINQ statically in the Fizzle project that targets .NET 2.0.
This will make the project more self-contained and reduce an additional
dependency in external assembly form.

Original issue reported on code.google.com by azizatif on 30 Apr 2009 at 9:58

Support nth-last-of-type pseudo-class selector

What new or enhanced feature are you proposing?

The :nth-last-of-type(an+b) pseudo-class notation represents an element
that has an+b-1 siblings with the same expanded element name after it in
the document tree, for a given zero or positive integer value of n, and has
a parent element. 

What goal would this enhancement help you achieve?

Greater CSS Selectors Level 3 compliance.

For more information, see:
http://www.w3.org/TR/css3-selectors/#nth-last-of-type-pseudo

Original issue reported on code.google.com by azizatif on 14 May 2009 at 11:44

Multiple CSS class failure

Fizzler doesn't support multiple class selectors like 'p.marine.pastoral'. To 
reproduce:

1. Create an HTML document with a <div class="class1 class2"></div> and 
<div class="class1 class3"></div>.
2. Do a 'var result = Parser.Parse("div.class1.class2")'.
3. Notice how 'result.Count' is 2 and not the expected 1.

Original issue reported on code.google.com by asbjornu on 7 Apr 2009 at 10:51

Add to the official Nuget repository

It would be real great if you guys could get added to the official nuget 
repository.

I created a specfile and package for you which I'm hosting locally but official 
drops would be preferable.

I've attached the spec and nupkg file I'm using to help you get started.

Original issue reported on code.google.com by [email protected] on 11 Sep 2011 at 8:57

Attachments:

Incorrect human readable text for a selector group

What steps will reproduce the problem?
1. Run Visual Fizzler
2. Type in "a, span" (w/o quotes) for selector

What is the expected output? What do you see instead?

The description reads, "Select all nodes with the <a> tag." Expected to see
something along the lines of, "Select all nodes with the <a> tag. Combining
with previous, select all nodes with the <span> tag."

Please use labels and text to provide additional information.

Using r125.

Original issue reported on code.google.com by azizatif on 29 Apr 2009 at 9:17

Visual Fizzler decodes HTML response incorrectly

What steps will reproduce the problem?

1. Start Visual Fizzler
2. From the File menu, select the Import From Web option
3. When prompted for URL, enter http://www.mozilla-europe.org/de

What is the expected output? What do you see instead?

Expected to see the HTML response with some text content in German. 
Instead, the text content contains odd characters. See attachment for an 
example.

Original issue reported on code.google.com by azizatif on 19 Oct 2009 at 3:25

Attachments:

Support substring matching attribute selector

Add [att*=val], represents an element with the att attribute whose value
contains at least one instance of the substring "val". If "val" is the
empty string then the selector does not represent anything.

Original issue reported on code.google.com by azizatif on 28 Apr 2009 at 12:10

HTML that doesn't parse correctly (but doesn't fail either)

I've been using Fizzler with great success, but today I came across some HTML 
that silently failed to parse correctly.

I was selecting all of the <a> elements and noticed that one was being ignored. 
Here are the repo steps:

1. Load the HTML from http://pastebin.com/T1Lsr6w6 (this is the "View Source" 
for http://www.diapers.com/product/productdetail.aspx?productid=16913)
2. Try to query the selector "#pdp"
3. Example code (assuming String html has the HTML above)

var doc = new HtmlDocument();
doc.LoadHtml(html);
var dom = doc.DocumentNode;
var pdpElement = dom.QuerySelector("#pdp");


What is the expected output? What do you see instead?
Expect pdpElement to be an HtmlNode of <a 
href="http://c1.diapers.com/images/products/p/pg/pg-256_1z.jpg" 
class="MagicZoomPlus" id="pdp" title="Pampers Sensitive Thick Baby Wipes Refill 
360ct." target="_blank">

Instead, it doesn't find a match.

What version of the product are you using? On what operating system?
Fizzler 0.9

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 6 Apr 2011 at 7:36

Support contains selector

Missing implementation for contains selector:

http://api.jquery.com/contains-selector/

Select all elements that contain the specified text.

Original issue reported on code.google.com by mirko%[email protected] on 29 Apr 2010 at 3:14

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.