Skip to content

Conversation

@daryltucker
Copy link

Twitter and OpenGraph have been split apart. I made all attempts to respect OpenGraph as the default provider, while allowing either to be used very easily.

Each 'Provider' can have different required attributes, as well as the attribute we key off of for finding these tags.

Passing provider to OpenGraph() will force a Provider. If any OpenGraph tags are found, OpenGraph becomes the Provider, which forces validity of OpenGraph instead of the original Provider.

is_valid() has been modified such that it will use the detected Provider. If tags of mixed providers are found, OpenGraph will take precedence.

to_html() has been altered to print using the Provider's name.

OrderedDict from collections is used to keep OpenGraph as top priority.

Twitter and OpenGraph have been split apart.  I made all attempts to respect OpenGraph as the default provider, while allowing either to be used very easily.

Each 'Provider' can have different required attributes, as well as the attribute we key off of for finding these tags.

Passing **provider** to OpenGraph() will force a Provider. If any OpenGraph tags are found, OpenGraph becomes the Provider, which forces validity of OpenGraph instead of the original Provider.

is_valid() has been modified such that it will use the detected Provider.  If tags of mixed providers are found, OpenGraph will take precedence.

to_html() has been altered to print using the Provider's name.

OrderedDict from collections is used to keep OpenGraph as top priority.
@daryltucker
Copy link
Author

I'm not sure if you ever wanted to support other Providers, but I figured I'd share the code with you. Thanks for writing opengraph :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant