V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
larkifly
V2EX  ›  Python

如何获取电脑中所有浏览器收藏的网址

  •  
  •   larkifly · 2014-07-21 11:38:22 +08:00 · 3343 次点击
    这是一个创建于 3582 天前的主题,其中的信息可能已经有所发展或是发生改变。
    浏览器安装的时候,可以导入其他浏览器的收藏夹,这个用python怎么实现了?
    4 条回复    2014-07-22 09:11:54 +08:00
    shaosongly
        1
    shaosongly  
       2014-07-21 12:41:58 +08:00
    我觉得你可以找一下各个浏览器收藏夹在系统中存放的位置,比如chrome,在mac下面书签都保存在~/Library/Application Support/Google/Chrome/Default/Bookmarks文件里。用Python读取这些文件,把网址解析出来
    larkifly
        2
    larkifly  
    OP
       2014-07-21 16:48:18 +08:00
    @shaosongly 但火狐的比较难找啊找了半天也没有找到
    shaosongly
        3
    shaosongly  
       2014-07-21 18:33:38 +08:00
    可以看一下这个文档,或者搜索:firefox 配置文件夹。https://support.mozilla.org/zh-CN/kb/%E7%94%A8%E6%88%B7%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6
    Mac下面我找了一下,在Application Support/Firefox/Profiles/default/bookmarks.html里面
    nanpuyue
        4
    nanpuyue  
       2014-07-22 09:11:54 +08:00
    你无法做到真正的“所有”,只能做到“常见”。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5555 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 08:44 · PVG 16:44 · LAX 01:44 · JFK 04:44
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.