awkward / ocarina Goto Github PK
View Code? Open in Web Editor NEWA library to get metadata and Open Graph information from URLs
License: MIT License
A library to get metadata and Open Graph information from URLs
License: MIT License
Ocarina is a great lib. It would be nice if we could install it via CocoaPods.
Thanks :)
Ocarina should be checked and up to date for Xcode 8.3.
Ocarina is unable to parse this YouTube link:
https://www.youtube.com/watch?v=v1wfQPGXhVA
This is because og:description is in body tag instead of head.
Correct Xpath query should be: "/html/body/meta[(@Property|@name)="og:description"]/@content"
What do you suggest for fixing it?
@davidvanleeuwen @samuelbeek @renssies @AvdLee @daveyheuser
Thanks!
Add an icon and screenshots to the README.md.
In OcarinaManager in taskDidComplete receiving a 404 statusCode will not execute failure block.
if let response = response, response.statusCode < 200 && response.statusCode >= 300 {
it should be response.statusCode < 200 || response.statusCode >= 300
Also it would be nice to expose HTTPURLResponse in error.UserInfo
Hi,
I've been trying out Ocarina on different news sites but on this one website, weirdly, it doesn't pull the og:description and other details. It only has url and originalUrl to the best of my knowledge.
which does have the headers
yet I always get nil.
Other sites I've tried has worked so far pulling the data.
Would you know why this is and if there's a fix?
thanks,
I see this lib great, however I can not implement into my project
At first I try to make Ocarina framework, than drag into my objective C project. However, I can not import URL+URLInformation
Than I try to do exactly as the instruction, as I drag the Ocarina.xcodeproj into my swift project. But still error: "Value of type '(UnsafePointer?, UnsafePointer?) -> Int32' has no member 'oca'"
Can you please help me. At best, can you help me to create the framework than I can pull into my objectiveC project ? Thank you
Hello Ocarina.
I would like to fetch metadata from twitter url but it doesn't work as I expected.
I was able to only get faviconURL which seems to be kind of broken and most other information was not fetched.
I would like to know if I am missing something here or some fix should be done for this library.
I tried out the code below.
let url = URL(string: "https://twitter.com/qldhealthnews/status/1326368544985059331?s=20")
url?.oca.fetchInformation(completionHandler: { (information, error) in
if let information = information {
print("Title : \(String(describing: information.title))")
print("URL : \(String(describing: information.url))")
print("imageURL : \(String(describing: information.imageURL))")
print("imageSize : \(String(describing: information.imageSize))")
print("faviconURL: \(String(describing: information.faviconURL))")
print(information)
} else if let error = error {
print(String(describing: error))
}
})
Then, I got logs below
Title : nil
URL : https://twitter.com/qldhealthnews/status/1326368544985059331?s=20
imageURL : nil
imageSize : nil
faviconURL: Optional(//abs.twimg.com/favicons/twitter.ico -- https://twitter.com/qldhealthnews/status/1326368544985059331?s=20)
Ocarina.URLInformation
Hi there! ๐
Thanks so much for the great work on this project! It solved a big issue I was facing getting metadata for some links. One thing I'd like to see is Swift package support, so I wanted to see if that is a possibility.
I'd also e more than happy to contribute this on a PR as well ๐
Thanks!
By tagging HEAD with with something like v1.1
, consumers of this library will be able to pull down the Swift 5 updates through services like Carthage.
Any chance you can update it to Swift 5 so it can be used int he latest Xcode?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.