for l in d.items('nl,de,en'):
if l.tag()=='nl':
dothis()
如何找到与 pyquery 对象关联的标签?方法 tag() 在 上面的例子不存在...
最佳答案
获取标签名称的正确方法是使用 is_()
函数。
for l in d.items('nl,de,en'):
if l.is_('nl')
dothis()
来自文档: https://pythonhosted.org/pyquery/modules/pyquery/pyquery.html#PyQuery.is
希望对您有所帮助。
关于python - 查找 pyquery 对象的标签名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28128104/