lxml
Python lxml: How to tell if an element has been removed from a tree?
I am attempting to manipulate a DOM tree using lxml\'s etree module.One task I haven\'t figured out yet is how to test whether a particular node is still part of a parsed tree.Since the behavior of et[详细]
2023-03-21 06:46 分类:问答How to handle nested form tags with lxml
I want to scrape some html pages that have nested form elements with lxml. Even BeautifulSoup chokes on these pages, the only parser I\'ve found that can handle them so far is Minimal开发者_如何学运维[详细]
2023-03-18 23:50 分类:问答Get <img>'s title-attribute with lxml in Python
I want to extract the onel-iner-texts from this website using Python. The messages in HTML look like this:[详细]
2023-03-18 19:54 分类:问答how to strip all child tags in an xml tag but leaving the text to merge to the parens using lxml in python?
How can one tell etree.strip_tags() to strip all possible tags from a given tag element? Do I have to map them myself, like:[详细]
2023-03-18 13:35 分类:问答How can I get the only element of a certain type out of a list more cleanly than what I am doing?
I am working with some xml files.The schema for the files specifies that there can only be one of a certain type of element (in this case I am working with the footnotes element).[详细]
2023-03-18 01:37 分类:问答How to preserve namespace information when parsing HTML with lxml?
>>> from lxml.etree import HTML, tostring >>> tostring(HTML(\'<fb:like>\')) \'<html><body><like/></body></html>\'[详细]
2023-03-17 22:19 分类:问答Python 3.2 lxml fill and submit form, select multiple, how to do it? value not working
Great page this one, coming from the perl world and after several years of doing nothing, I\'ve re-started to program again (this web page didn\'t exist, how things change). And now, after a 2 full-da[详细]
2023-03-17 11:47 分类:问答Is it possible to include a library like lxml without installing it?
I need to perform some xml parsing using a machine that I may not have permission to install libraries in.So is it possible to include a 开发者_C百科python library like lxml with my source?Have you tr[详细]
2023-03-16 14:55 分类:问答Python- is there a module that will automatically scrape the content of an article off a webpage?
I know there is lxml and BeautifulSoup, but that won\'t work for my project, because I don\'t know in advance what the H开发者_如何转开发TML format of the site I am trying to scrape an article off of[详细]
2023-03-16 10:24 分类:问答Why does printing to a utf-8 file fail?
So I ran into a problem this afternoon, I was able to solve it, but I don\'t quite understand why it worked.[详细]
2023-03-16 02:47 分类:问答