Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6148981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:22:34+00:00 2026-05-23T19:22:34+00:00

I am working on a quick and dirty script to get Chromium’s bookmarks and

  • 0

I am working on a quick and dirty script to get Chromium’s bookmarks and turn them into a pipe menu for Openbox. Chromium stores it’s bookmarks in a file called Bookmarks that stores information in a dictionary form like this:

{
   "checksum": "99999999999999999999",
   "roots": {
      "bookmark_bar": {
         "children": [ {
            "date_added": "9999999999999999999",
            "id": "9",
            "name": "Facebook",
            "type": "url",
            "url": "http://www.facebook.com/"
         }, {
            "date_added": "999999999999",
            "id": "9",
            "name": "Twitter",
            "type": "url",
            "url": "http://twitter.com/"

How would I open this dictionary in this file in Python and assign it to a variable. I know you open a file with open(), but I don’t really know where to go from there. In the end, I want to be able to access the info in the dictionary from a variable like this bookmarks[bookmarks_bar][children][0][name] and have it return 'Facebook'

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:22:35+00:00Added an answer on May 23, 2026 at 7:22 pm

    Do you know if this is a json file? If so, python provides a json library.

    Json can be used as a data serialization/interchange format. It’s nice because it’s cross platform. Importing this like you ask seems fairly easy, an example from the docs:

    >>> import json
    >>> json.loads('["foo", {"bar":["baz", null, 1.0, 2]}]')
    [u'foo', {u'bar': [u'baz', None, 1.0, 2]}]
    

    So in your case it would look something like:

    import json
    with open(file.txt) as f:
        text = f.read()
        bookmarks = json.loads(text)
    print bookmarks[bookmarks_bar][children][0][name]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a quick-and-dirty Perl script, I have a data structure like this: $tax_revenue{YEAR}{STATE}{GOVLEV}{TAX} =
I'm working on a very, very quick and dirty application using almost entirely scaffold
Having a small problem for a quick Search and Highlight script that I'm working
I'm working on a quick setup program in Visual Studio and wanted to change
As a temporary quick fix to mitigate the major risk while working on the
I am working with a huge list of URL's. Just a quick question I
I'm working on a configuration script for a JNI wrapper. One of the configuration
I need to create a quick and dirty solution to migrate data from database
I am working on quick project , listing search results from bing and my
Hopefully a nice and quick one for you... the below code is working fine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.