Skip to main content

ExtendedOpenGraphParser is a python module for parsing the Open Graph ProtocoL. Open Graph Protocol spec: http://ogp.me/

Installation

pip install ExtendedOpenGraph

Features

  • Based on opengraph.

  • If not exist Open Graph properties in meta tag, it is able to parse basic Metadata.

  • Input URL and HTML.

  • Output python dictionary.

  • Like Facebook.

Usage

input : url

>>> import ExtendedOpenGraph
>>> data = ExtendedOpenGraph.parse(url="http://www.twitter.com")
>>> for key, value in data.items():
...     print "%-15s => %s" % (key, value)
...
url             => http://www.twitter.com
image           => https://abs.twimg.com/a/1373572090/t1/img/front_page/jp-mountain@2x.jpg
type            => website
title           => 트위터

input : html

>>> ex_html="<html><head><title>ExtendOpenGraph</title></head><body><img src='logo.png'/></body></html>"
>>> data = ExtendedOpenGraph.parse(html=ex_html)
>>> for key, value in data.items():
...     print "%-15s => %s" % (key, value)
...
url             => None
image           => logo.png
type            => website
title           => ExtendOpenGraph

Metadata

Release files for ExtendedOpenGraph 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ExtendedOpenGraph 0.1
File Size Uploaded
ExtendedOpenGraph-0.1.tar.gz 3.7 kB Details

Release files / ExtendedOpenGraph-0.1.tar.gz

Download URL ExtendedOpenGraph-0.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
60d22c3b55a987fc613c51d5928d6344706e6077ad19a1d03ef043e275de45d5
BLAKE2b-256 checksum
How to use checksums
3ca01c967193d8f682a46ba970cf93b15afa20f80304b2fa699a9415abb9d264
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.3

1 release file

This release

0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page