Twitter’s web app was refactored and I’ve re-jigged my web clipper as best I can. This web clipper will take a Twitter user’s profile information into a table with fields for:
Name
Profile from page URL - to be trimmed
Avatar
Bio from selected text
The refactored mark-up in Twitter web app means this clip action needs a little extra work.
The steps I follow:
- go to someone’s Twitter profile eg https://twitter.com/khoi
- select the text on their bio
- click their avatar to enlarge it (this exposes a CSS selector for clipping the image, and appends /photo to the URL eg https://twitter.com/khoi/photo)
- activate Airtable web clipper action
- trim off the /photo from the page URL
- tidy up any undesirable new lines in the Bio text produced by @mentions or #tags
Here’s the clip action recipe for Twitter profiles:
{
"schemaVersion": 3,
"fieldMappings": [
{
"fieldName": "Name",
"fieldType": "singleLineText",
"defaultValue": {
"type": "cssSelector",
"opts": {
"cssSelector": "h2[aria-level=\\"2\\"][role=\\"heading\\"] div div div span"
}
}
},
{
"fieldName": "Profile",
"fieldType": "url",
"defaultValue": {
"type": "pageUrl",
"opts": null
}
},
{
"fieldName": "Avatar",
"fieldType": "multipleAttachments",
"defaultValue": {
"type": "cssSelector",
"opts": {
"cssSelector": "img[draggable=\\"true\\"]"
}
}
},
{
"fieldName": "Bio",
"fieldType": "multilineText",
"defaultValue": {
"type": "selectedText",
"opts": null
}
}
]
}