PYQuery fails to work for the following html file

sleepycal avatarsleepycal created an issue


The following HTML file fails to work with pyquery:

The query failing is: pq(a)("meta")

It simply returns blank data.

Can't see any valid reason why it would reject this file.

Any suggestions??


Comments (13)

  1. sleepycal

    Couldn't find anywhere in the docs stating namespaces were not supported. Re-opening at the very least to have the docs updated, or have an assertion raised on the presence of xmlns.

    Or, display a warning in stderr/stdout saying xmlns may not be supported, so at least its not being silently ignored!

  2. sleepycal
    • changed status to open

    Namespaces are not supported if they are within a <html> tag though - correct? Sorry to keep setting this as 'opened' but so far all you have told us is that the function failed because "the html uses namespaces"... But then you say namespaces are supported.

    So far, everytime I have tried using namespaces in the HTML with PYQuery, it has failed. This sounds like a bug to me, no?

  3. sleepycal

    Nice - are you planning on making this automatic? I.e. if it detects xhtml namespaces, then it will automatically remove them and convert to html?

  4. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.