bnew

Veteran
Joined
Nov 1, 2015
Messages
52,832
Reputation
8,004
Daps
151,040
adjusted the output. this only saves tweets from the parents username aka tweet author. this also extracts video urls from nitter instances that support direct video links.


This bookmarklet is designed to run on a Nitter instance, which is an alternative front-end for Twitter. Here’s what it does in layman's terms:
  1. Collect Tweets: It scans the current page for tweets and logs how many tweets it finds.
  2. Identify Username: It identifies the username of the user whose tweets are being collected.
  3. Extract Tweet Content:
    • For each tweet, it extracts the text content, including any quoted tweets and media (images and videos).
    • It cleans up the text by removing HTML tags and formatting links and media URLs.
  4. Collect Thread Continuation URLs: It collects URLs of continued threads if any.
  5. Format Text: It formats all extracted tweet texts into a single string with spoilers for full text and large images.
  6. Copy to Clipboard: It copies the formatted text to your clipboard.
  7. Display Notification: It shows a temporary notification that the tweets have been copied.



Here's an example of what might be copied to your clipboard:
Code:
https://twitter.com/username/status/1234567890
[SPOILER="thread continued"]
https://twitter.com/username/status/1234567891
https://twitter.com/username/status/1234567892
[/SPOILER]

[SPOILER="full text & large images"]

1/3
This is the first tweet text.
[img]https://pbs.twimg.com/media/image.jpg[/img]

2/3
This is the second tweet text with a quoted tweet:
[Quoted tweet]
Quoted text here
[U][URL]https://twitter.com/otheruser/status/0987654321[/URL][/U]

3/3
This is the third tweet text with a video:
[U][URL]https://video.twimg.com/ext_tw_video/1234567890.mp4[/URL][/U]

[COLOR=rgb(184, 49, 47)][B][SIZE=5]To post tweets in this format, more info here: [URL]https://www.thecoli.com/threads/tips-and-tricks-for-posting-the-coli-megathread.984734/post-52211196[/URL][/SIZE][/B][/COLOR]
[/SPOILER]
This output includes:
  • The original URL of the first tweet.
  • A spoiler containing URLs of continued threads.
  • A spoiler containing all formatted tweet texts along with any media links and quoted tweets.
 
Last edited:

bnew

Veteran
Joined
Nov 1, 2015
Messages
52,832
Reputation
8,004
Daps
151,040
different output ...
this also extracts video urls from nitter instances that support direct video links.

This bookmarklet is designed to collect and format tweets from a Nitter instance (a privacy-focused alternative to Twitter) in a specific way, making it easier to copy and share them. Here’s what it does in layman's terms:
  1. Collects Tweets: It scans the page for all visible tweets.
  2. Extracts Tweet Details: For each tweet, it extracts the tweet text, author, links, images, and videos.
  3. Formats the Content: It formats the extracted content into a structured text that includes:
    • The original URL of the tweet thread.
    • A list of URLs for continued threads.
    • The full text of each tweet with author names and any quoted tweets or media links.
  4. Copies to Clipboard: The formatted text is then copied to your clipboard.
  5. Displays Notification: A temporary notification appears on the screen indicating that the tweets have been copied.



Here’s an example of what you might see after running this bookmarklet:
Code:
https://twitter.com/user/status/1234567890
[SPOILER="thread continued"]
https://twitter.com/user/status/1234567891
https://twitter.com/user/status/1234567892
[/SPOILER]

[SPOILER="full text & large images"]

1/3
@AuthorName
This is the first tweet text.
[U][URL]https://example.com/link[/URL][/U]

[img]https://pbs.twimg.com/media/image.jpg[/img]

2/3
@AuthorName
This is the second tweet text with a quoted tweet:
[Quoted tweet]
Quoted tweet text.
[U][URL]https://twitter.com/quoteduser/status/1234567893[/URL][/U]

3/3
@AuthorName
This is the third tweet text with a video link:
[U][URL]https://video.twimg.com/ext_tw_video/1234567894.mp4[/URL][/U]

[COLOR=rgb(184, 49, 47)][B][SIZE=5]To post tweets in this format, more info here: [URL]https://www.thecoli.com/threads/tips-and-tricks-for-posting-the-coli-megathread.984734/post-52211196[/URL][/SIZE][/B][/COLOR]
[/SPOILER]
This output includes links to continue reading threads, full text of each tweet along with any media or quoted content, and instructions on how to post such formatted content elsewhere.
 
Top