-
Notifications
You must be signed in to change notification settings - Fork 769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New translator for LinkedIn post pages. #3373
base: master
Are you sure you want to change the base?
Conversation
// NOTE: This translator will only work if you are *not* logged into LinkedIn. Logged-in versions of the page do not include the necessary metadata. If you are logged into LinkedIn, you can open a private or incognito window to use the translator. // | ||
|
||
function detectWeb(doc, url) { | ||
if (url.includes('/posts/')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If scrape()
only works when script[type="application/ld+json"]
exists, we should check that here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
} | ||
|
||
newItem.forumTitle = "LinkedIn"; | ||
newItem.postType = "LinkedIn Post"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if we really need this - it's a forumPost
on forumTitle
"LinkedIn".
|
||
newItem.forumTitle = "LinkedIn"; | ||
newItem.postType = "LinkedIn Post"; | ||
newItem.websiteType = "Social Media"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto - I don't think this is necessary for a citation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure about this. LinkedIn posts are in kind of a gray area between forum posts and blog posts.
Thanks! Some comments above. |
Accepted suggestion for modifying URL Co-authored-by: Abe Jellinek <[email protected]>
modified code style Co-authored-by: Abe Jellinek <[email protected]>
accepted change to push action Co-authored-by: Abe Jellinek <[email protected]>
Co-authored-by: Abe Jellinek <[email protected]>
This translator will retrieve all relevant metadata and a snapshot from LinkedIn individual post pages. It will only work when not logged into LinkedIn, because the page structure is entirely different when viewed by a logged-in user. It will work properly in incognito/private windows.