MetaRod

MetaRod is a lightweight url meta data parser library.

MetaRod

Usage

 MetaRod().build("https://www.vagrantup.jp/entry/2020/01/08/012539").og(completion: { result in
  // Do what you want to do with your meta data.
 }) { error in
  // Error
 }

or

 DispatchQueue.global().async {
    do {
      let result = try MetaRod().build("https://www.vagrantup.jp/entry/2020/01/08/012539").og()
      DispatchQueue.main.async {           
        // Do what you want to do with your meta data.                
      }
    } catch {
      // Error     
    }
 }

Installation

CocoaPods

MetaRod is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'MetaRod'

Carthage

Carthage is a decentralized dependency manager for Cocoa application.

$ brew update
$ brew install carthage

To integrate MetaRod into your Xcode project using Carthage, specify it in your Cartfile:

github "misyobun/MetaRod"

Then, run the following command to build the MetaRod framework:

$ carthage update --platform iOS

MetaRod has dependency for SwiftSoup.framework, Carthage will automatically retrieve it for you.
You will then have to drag it yourself into your project from the Carthage/Build folder.
Of course, don't forget to drag MetaRod.framework into your project.

(Kingfisher.framework,KingfisherSwiftUI.framework is for the sample project.)

GitHub