Vastsea 发表于 2020-5-25 14:40:37

Python 可以添加书签到Chrome 浏览器吗?

有一些经常需要打开的设备站点,想添加到Chrome的收藏夹里面。有十几个,倒是可以手动一个个加进去。

就是想知道是否可以用Python实现?怎么实现?

Vastsea 发表于 2020-5-25 14:44:07

本帖最后由 Vastsea 于 2020-5-25 14:45 编辑

链接如下:

https://cn-br-ntx-cl1:9140/console/#login

https://cn-kk-ntx-cl1:9140/console/#login

https://cn-dbdb-ntx-cl1:9140/console/#login

https://cn-so-ntx-cl1:9140/console/#login

https://cn-qqq-ntx-cl1:9140/console/#login

https://cn-ww-ntx-cl1:9140/console/#login

永恒的蓝色梦想 发表于 2020-5-25 16:07:10

没有接口。

Vastsea 发表于 2020-5-26 08:09:05

永恒的蓝色梦想 发表于 2020-5-25 16:07
没有接口。

没得机会呗?

永恒的蓝色梦想 发表于 2020-5-26 08:10:27

Vastsea 发表于 2020-5-26 08:09
没得机会呗?

我觉得应该没有吧。

suchocolate 发表于 2020-5-26 08:30:46

收藏夹就是txt,打开看看内容写个txt就行:
ls1 = ['https://cn-br-ntx-cl1:9140/console/#login', 'https://cn-kk-ntx-cl1:9140/console/#login']
for n, v in enumerate(ls1):
    with open('favorite_%d.url' % n, 'w') as f:
      f.write('\n')
      f.write('URL='+v)

Vastsea 发表于 2020-5-26 11:44:58

非常感谢!楼上。

你这个代码生成了两个快捷文件,而且是Edge的,怎么添加到Chrome常用工具栏中,并创建一个组啊。就是我一楼图片中显示的那样。

zwhe 发表于 2020-5-26 15:38:37

{:7_113:}
页: [1]
查看完整版本: Python 可以添加书签到Chrome 浏览器吗?