我正在尝试构建一个复杂的xpath表达式,它将回答以下条件.
从下面的XML数据中,返回User实体,其中:
他有2个不同的配置文件值,分别是" operator "和" admin "(我不知道前面的确切顺序)
<user>
<login>user1</login>
<name>User 1</name>
<profile>
<value>admin</value>
<id>2</id>
<description>admin users</description>
</profile>
<profile>
<value>operator</value>
<id>1</id>
<description>Operator</description>
</profile>
</user>
<user>
<login>user2</login>
<name>User 2</name>
<profile>
<value>admin</value>
<id>4</id>
<description>admins users</description>
</profile>
<profile>
<value>poweruser</value>
<id>5</id>
<description>power users</description>
</profile>
</user>
</root>
Run Code Online (Sandbox Code Playgroud)有人可以为这种情况提供一个例子吗?
编辑:添加了复杂的配置文件实体
是否可以使用Amazon Associates Web服务或任何其他工具查找特定类别中的所有新Amazon产品?
我还尝试了RSS,它只提供了10个结果,并且在几个月内只更新了一次.你还有其他建议吗 ?
这是我正在使用Beautiful Soup探索的HTML文件的片段.
<td width="50%">
<strong class="sans"><a href="http:/website">Site</a></strong> <br />
Run Code Online (Sandbox Code Playgroud)
我想得到<a href>任何有哪个<strong class="sans">和哪个在里面的行<td width="50%">.
是否可以使用Beautiful Soup查询HTML文件中的多个条件?
有没有一种简单的方法可以使用Python代码更新我的Facebook状态("你有什么想法?"框)?