Wasurenbo is a Chrome extension designed to extract bookmarks from X.com (formerly Twitter), store them, and display a random bookmark daily. This extension automates the process of fetching bookmarks and provides a user-friendly interface to view them.
-
Clone the Repository :
git clone https://github.com/yourusername/wasurenbo.git
-
Navigate to the Project Directory :
cd wasurenbo
-
Load the Extension in Chrome :
- Open Chrome and navigate to chrome://extensions/ .
- Enable "Developer mode" using the toggle switch.
- Click "Load unpacked" and select the wasurenbo directory.
-
Initial Bookmark Scraping :
- Go to x.com/i/bookmarks and wait for 5 minutes
- Go for a coffee (the extension will scrape your latest bookmarks automatically)
-
Authentication & Initialization :
- Uses existing user session for authentication.
- Initializes browser automation tools like Puppeteer or Selenium.
-
Navigation Phase :
- Launches the browser and navigates to the X.com/i/bookmarks bookmarks page.
- Verifies successful login state and handles potential redirects.
-
Data Extraction :
- Implements DOM scraping using specified selectors to extract tweet text, URLs, and images.
- Creates a data structure to store extracted elements.
-
Dynamic Loading :
- Simulates scrolling with a delay to load more bookmarks.
- Detects new elements loaded after each scroll and repeats extraction.
-
Data Storage :
- Formats extracted data into CSV or JSON.
- Saves data locally with a unique filename using a timestamp.
-
Scheduled Task :
- Uses Chrome's alarm API for daily scheduling.
- Fetches a random bookmark from stored data once a day.
-
Rendering :
- Displays the selected bookmark in a side-div element on the page.
- Provides user interaction handlers for toggling visibility and refreshing bookmarks.
- Webhook for New Bookmarks : Need to intercept network requests for creating bookmarks.
- Handling Deleted Bookmarks : No network requests available for detecting deletions.
- Large Number of Bookmarks : Chrome storage may fail with more than 100 bookmarks; consider using IndexedDB.
- Dynamically Changing Bookmarks : Handle un-bookmarked tweets effectively. Additions
- Gemini API Integration : Use the Gemini API key to render related search results on the bookmark display.
- Enhanced UI : Improve the user interface with subtle animations and better error handling.
- Advanced Filtering : Allow users to filter bookmarks based on specific criteria.
Wasurenbo is a powerful tool for managing bookmarks on X.com, providing automation and ease of use. Future versions aim to enhance functionality and address current limitations.