Scrape Threads post

Accepts a Thread link as input, extracts the username and excerpt, and formats it with multiple link types into a JSON dictionary shared as output.

Actions Used

Tests if a condition is true, and if so, runs the actions inside. Otherwise, the actions under “Otherwise” are run.
Stop shortcut
Stops execution of the current shortcut and dismisses the shortcut on screen. No more actions will be run after this action.
Passes the specified list of key-value pairs to the next action as a dictionary.
Get Contents of URL
Gets the contents of URLs passed into the action. Useful for downloading files and web content, or for making API requests. Includes GET, POST, PUT, PATCH, DELETE methods, and options to add headers. To make a multipart HTTP request, choose “Form” as the request body type and add files as field values.
Set Variable
Sets the value of the specified variable to the input of this action.
Get URLs from Input
Returns any links found in the output from the previous action.
Passes the specified URL to the next action.
Replace Text
Replaces some text passed into the action with other text.
Split Text
Separates text passed into the action into a list.
Passes the specified text to the next action.
Get Text from Input
Returns text from the previous action’s output. For example, this action can get the name of a photo or song, or the text of a web page.
Get Type
Returns the type of every item passed as input. For example, if a URL is passed, this action will return “URL”.
Get Item from List
Returns one or more items from the list passed as input. You can get the first item, the last item, a random item, the item at a particular index, or items in a range of indexes.
Show Result
Shows the specified text in Siri or in an alert.
Stop and Output
Stops execution of the current shortcut, and outputs content. This action is useful when: • Running a shortcut from another shortcut (using the Run Shortcut action). The output will be used as the output of the Run Shortcut action. • Running a shortcut from Quick Actions in Finder on macOS. The output will be saved as a file alongside the files selected in Finder. • Running a shortcut from Services on macOS. The output will replace the selected content, if applicable. • Or, when running a shortcut from another location that supports output, like the command-line or the Shortcuts URL scheme. No more actions will be run after this action.

Extra Details

Run Shortcut deep link
Open Shortcut deep link
AppleScript code
tell application “Shortcuts Events” run shortcut “Scrape Threads post” end tell

More From This Folder

OCR Thread

Accepts a Thread link, scrapes the data, then opens the link, waits for it to load, takes a screenshot, extracts text from the screenshot, then prompts you to delete the extra text before replacing the excerpt in the Thread JSON dictionary.

Get Shortcut »

More From The Library