Code Monkey home page Code Monkey logo

Comments (6)

felixdkatt avatar felixdkatt commented on August 25, 2024

also I used facebook open graph debugger and except for small image warning it parsed ok

https://developers.facebook.com/tools/debug/sharing/?q=theyeshiva.net

from urlembeddedview.

dan085 avatar dan085 commented on August 25, 2024

this link.... I cant to read meta-data https://m.youtube.com/watch?v=kSUJ28rgNyo

from urlembeddedview.

Luten avatar Luten commented on August 25, 2024

@felixdkatt Sites you provided doesn't support OpenGraph protocol as it is.
Facebook debug tool is not about OpenGraph protocol only.
Facebook and iMessages do additional work on some common scenarios for sites that doesn't support OpenGraph.
To check site against OpenGrpah protocol check this one:
https://opengraphcheck.com/result.php?url=https%3A%2F%2Fwashingtonpost.com#.XIdnVRMzZTY
https://opengraphcheck.com/result.php?url=https%3A%2F%2Ftheyeshiva.net#.XIdnZRMzZTY

from urlembeddedview.

H3ndrx avatar H3ndrx commented on August 25, 2024

OK, i think i have fix for that.
There are websites that are using "name" instead of "property" key in <meta ... block>
Also, sometimes websites are using capital P i < meta Property > and here regular expression is caseSensitive.
So here are my adjustments @marty-suzuki @felixdkatt
In OpenGraph.HTML.swift
change implementation of property regex like so:

static let regex: NSRegularExpression? = { let patterns = [ // "" & "" "(?:content\\s*=\\s*\"([^>]*)\"\\s*property\\s*=\\s*\"([^>]*)\")", "(?:property\\s*=\\s*\"([^>]*)\"\\s*content\\s*=\\s*\"([^>]*)\")", // name instead of property "(?:content\\s*=\\s*\"([^>]*)\"\\s*name\\s*=\\s*\"([^>]*)\")", "(?:name\\s*=\\s*\"([^>]*)\"\\s*content\\s*=\\s*\"([^>]*)\")", // '' & '' "(?:content\\s*=\\s*'([^>]*)'\\s*property\\s*=\\s*'([^>]*)')", "(?:property\\s*=\\s*'([^>]*)'\\s*content\\s*=\\s*'([^>]*)')", // "" & '' "(?:content\\s*=\\s*\"([^>]*)\"\\s*property\\s*=\\s*'([^>]*)')", "(?:property\\s*=\\s*\"([^>]*)\"\\s*content\\s*=\\s*'([^>]*)')", // '' & "" "(?:content\\s*=\\s*'([^>]*)'\\s*property\\s*=\\s*\"([^>]*)\")", "(?:property\\s*=\\s*'([^>]*)'\\s*content\\s*=\\s*\"([^>]*)\")" ] let pattern = "meta\\s*\(patterns.joined(separator: "|"))\\s*>?" return try? NSRegularExpression(pattern: pattern, options: [.caseInsensitive]) }()

from urlembeddedview.

H3ndrx avatar H3ndrx commented on August 25, 2024

here is pull request to fix that #84 @marty-suzuki

from urlembeddedview.

felixdkatt avatar felixdkatt commented on August 25, 2024

thank you @H3ndrx I will check it out

from urlembeddedview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.