4
A
回答
8
如果使用find_by_* methods選擇元素,則這些元素返回的實例爲ElementList
s。你選擇你感興趣的(最有可能的ElementAPI
實例)的元素後,訪問屬性像一本字典:
the_element['href']
1
#simplest possible working example demonstrating this in action
import splinter
b = splinter.Browser()
b.visit("http://www.google.com")
elems = b.find_by_tag("a")
for e in elems:
print(e["href"])
相關問題
- 1. VBA獲取href值
- 2. 獲取href值(WebDriver)
- 3. Jquery獲取href值
- 4. 在ajax響應中獲取href值
- 5. 獲取href的值Angularjs
- 6. 通過jQuery獲取href值
- 7. jquery mobile獲取href var值
- 8. 如何獲取href值?
- 9. 獲取href值的內容
- 10. 在表格中獲取href
- 11. 如何從列表中獲取href值?
- 12. 獲取選中複選框的href值?
- 13. 從類別選擇中獲取href值
- 14. 從基於span標籤值的標籤中獲取href的href
- 15. 獲取HREF硒
- 16. 獲取HREF
- 17. 如何使用jQuery獲取href值?
- 18. 如何獲取href參數值
- 19. 獲取href的值的Json與HAL
- 20. 如何從href值獲取權威url?
- 21. 如何從錨點href獲取值?
- 22. 獲取itemprop的href的值與jQuery
- 23. asp.net c#如何從href獲取價值?
- 24. xpath無法獲取錨點href值
- 25. 獲取文本框的值和HREF
- 26. Ruby機械化獲取href屬性值
- 27. 從href參數獲取jQuery的值?
- 28. 如何使用Coldfusion獲取href值?
- 29. 使用jQuery從href獲取價值
- 30. Node.js - 在app.js中獲取href的ID
太糟糕了'元素[「HREF」]'返回一個絕對URL(至少在Firefox中),而不是像HTML中的實際屬性,這可能是相對的。 –