LeonardoCardoso / SwiftLinkPreview

It makes a preview from an URL, grabbing all the information such as title, relevant texts and images.
https://leocardz.com/swift-link-preview-5a9860c7756f
MIT License
1.37k stars 196 forks source link

Github Repository Image not parsed properly #144

Closed MuhtasimTanmoy closed 3 years ago

MuhtasimTanmoy commented 3 years ago

Using:

SwiftLinkPreview 3.3.0
Xcode 12.4

Issue:

Invalid response image attribute in case of any GitHub URL.

Reproduce By:

Request URL:

  https://github.com/LeonardoCardoso/SwiftLinkPreview

Response Wrong Attribute:

  image: Optional("https://github.githubassets.com/images/search-key-slash.svg")

Should be:

  image: Optional("https://opengraph.githubassets.com/ff9150cfc28a8413bb2fc25c4b82ebf0539
                 7aa3e51e0642527dc68aabdeb1368/LeonardoCardoso/SwiftLinkPreview")

Reason:

Failing to parse the content of this tag <meta property="og:image" content=""> for opengraph image.
LeonardoCardoso commented 3 years ago

Thanks for spotting this. I don't have the capacity to work on this right now. Feel free to contribute and open a PR.

MuhtasimTanmoy commented 3 years ago

Kindly check the pull request. Working for all Github links, and previously tested links.

LeonardoCardoso commented 3 years ago

@MuhtasimTanmoy thanks! I will check ASAP.

MuhtasimTanmoy commented 3 years ago

Hi, just following up regarding this issue.

LeonardoCardoso commented 3 years ago

Fixed in version 3.4.0