爱意满满的作品展示区。
Esay

BeautifuSoup Helper - 制作爬虫小帮手,看看 find 选中了啥

  •  
  •   Esay · Mar 1, 2014 · 4476 views
    This topic created in 4455 days ago, the information mentioned may be changed or developed.
    使用 BeautifulSoup 感觉不够直观,就写了一个的小工具,给选中的部分加上一个红框,欢迎大家使用、修改。



    Source: https://github.com/Jeswang/beautiful-soup-helper
    PS: 运行 Python 程序的部分用了 @binux 的一些代码,代码写得很规范,学到了很多,在这里特别感谢。
    7 replies    2014-05-26 19:23:26 +08:00
    xiaozi
        1
    xiaozi  
       Mar 1, 2014
    直接使用chrome的xpath插件就可以了
    9hills
        2
    9hills  
       Mar 1, 2014 via iPad
    嗯,chrome能直接得到xpath简直不要太赞,直接用lxml就好了
    binux
        3
    binux  
       Mar 1, 2014   ❤️ 1
    https://gist.github.com/binux/9286057

    还是css选择器语法简单
    Esay
        4
    Esay  
    OP
       Mar 1, 2014
    @binux

    @xiaozi @9hills 确实好用,多谢推荐。有的时候还会需要想用用熟悉的 BeautifulSoup 嘛。
    wangfeng3769
        5
    wangfeng3769  
       May 26, 2014
    @Esay xp 下运行是不是有问题呀,老鸨内存泄漏问题。
    wangfeng3769
        6
    wangfeng3769  
       May 26, 2014
    Traceback (most recent call last):
    File "E:\beautiful-soup-helper-master\beautiful-soup-helper-master\src\soup_helper.py", line 198, in <module>
    dialog = MainWindow(None, "Soup Helper")
    File "E:\beautiful-soup-helper-master\beautiful-soup-helper-master\src\soup_helper.py", line 63, in __init__
    self.Bind(html2.EVT_WEB_VIEW_LOADED, self.LoadHTMLFihish, self.browser)
    AttributeError: 'module' object has no attribute 'EVT_WEB_VIEW_LOADED'
    swig/python detected a memory leak of type 'wxPyXmlSubclassFactory *', no destructor found.
    Esay
        7
    Esay  
    OP
       May 26, 2014
    额 搜索了一下,试下?

    http://stackoverflow.com/questions/16460545/wxpython-passing-user-datas-to-html2

    EVT_WEB_VIEW_LOADED -> EVT_WEBVIEW_LOADED

    另外,Chrome 的 copy xpath 确实好用,也推荐你试试。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5697 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 61ms · UTC 07:06 · PVG 15:06 · LAX 00:06 · JFK 03:06
    ♥ Do have faith in what you're doing.