Skip to content

Instantly share code, notes, and snippets.

View Shaunmak1214's full-sized avatar
🏠
Working from home

Shaun Mak Shaunmak1214

🏠
Working from home
View GitHub Profile
@Shaunmak1214
Shaunmak1214 / script.js
Created June 17, 2025 03:51 — forked from luighifeodrippe/script.js
Download a JSON List of twitter bookmarks
/* Enhancements to the Twitter Scraping Script:
This update to the script introduces a more robust mechanism for extracting detailed interaction data from tweets as they are scraped from Twitter. Previously, the script focused on collecting basic content such as the tweet's text. Now, it has been augmented to include a comprehensive extraction of interaction metrics, including replies, reposts, likes, bookmarks, and views, for each tweet.
Key Changes:
1. Improved Data Extraction:
- The script now searches through all elements within a tweet that have an `aria-label` attribute, filtering for labels that contain key interaction terms (replies, reposts, likes, bookmarks, views). This ensures that only relevant `aria-labels` are considered for data extraction.
2. Flexible Interaction Data Parsing:
@Shaunmak1214
Shaunmak1214 / AlertDialogWrapper.tsx
Last active September 4, 2022 05:06
An alert dialog wrapper that support asynchronous handling of confirmations. Providing a function-like type approach to instantiate your alert dialog
import React, { useRef } from 'react';
import {
AlertDialog,
AlertDialogBody,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogContent,
AlertDialogOverlay,
AlertDialogCloseButton,