爬虫定位器--Beautiful Soup和selenium用法大全

目录

前言

Beautiful Soup

selenium


前言

最近爬虫定位元素总是觉得力不从心,搜集了几篇文章的知识,以供参考。后缀名就是对于便签的属性,这些方法虽然不是最好的,但是写一些小爬虫来定位是没问题的。

Beautiful Soup

           find()

           find_all()

           find_parent()

           find_parents()

           find_next_sibling()

           find_next_siblings()

扫描二维码关注公众号,回复: 4136379 查看本文章

           find_previous_sibling()

           find_previous_siblings()

           find_previous()

           find_all_previous()

           find_next()

           find_all_next()

selenium

          find_element_by_id   

          find_element_by_name

          find_element_by_xpath

          find_element_by_link_text

          find_element_by_partial_link_text

          find_element_by_tag_name

          find_element_by_class_name

          find_element_by_css_selector

猜你喜欢

转载自blog.csdn.net/Da___Vinci/article/details/84111107