Skip to main content

opengraph_parse

Ben Jacobson 2020

Parses Open Graph meta tags of web pages. Use this to generate previews of web pages.

The purpose of this is to make it easy to scrape a pages opengraph meta tags. This is helpful if you ever want to create a preview of a web page like you'd see when you post to social media, or post a link on Slack.

Uses Python >=3.6.9

Installation

pip install opengraph_parse

Usage

from opengraph_parse import parse_page

if name== "main": # parse the page parsed_og_tags = parse_page("http://www.facebook.com", ["og:url", "og:image", ])

# result is a python dict containing the opengraph tags, simply print them out, or use a for loop to iterate over these. 
for key, value in parsed_og_tags.items():
    print (f"'{key}' : '{value}'")

Release files for opengraph-parse 0.0.6

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

Source distribution (sdist)

Source distribution for opengraph-parse 0.0.6
File Size Uploaded
opengraph_parse-0.0.6.tar.gz 2.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for opengraph-parse 0.0.6
File Interpreter ABI Platform
opengraph_parse-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 6.9 kB

Release files / opengraph_parse-0.0.6.tar.gz

Download URL opengraph_parse-0.0.6.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2707cf9d9e84493472d63906a44dd1c74fd4b2967604da17f2e5f5af7ffbe87d
BLAKE2b-256 checksum
How to use checksums
b1057036c001a9c4368147b4c103e1b5c4c27b6c9056b6b9ef0e061ec3563131
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

Release files / opengraph_parse-0.0.6-py3-none-any.whl

Download URL opengraph_parse-0.0.6-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0c1e8d900ef1d5d1abfd8b60a5bdbb8b7a371da7b4c51189a4498cac6aa6442
BLAKE2b-256 checksum
How to use checksums
9aac474497a234c0f54c5e17d7e28aeec0ac4b957778be97c4c0aab19c738bb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

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