Skip to main content

Getting user profile data from external phpBB forums

Sidebar

I recently wrote and released a python module to allow fetching of profile data.

You can install it using pip:

pip install beautifulsoup4 phpbb-parser

Here’s how you import and use a profile:

import phpbb_parser as parser

username = "rubenwardy"
profile = parser.get_profile("https://forum.minetest.net", username)

if profile:
    signature = profile.signature.text
    location = profile.get("location") or "unknown"
    github = profile.get("github") or "none"

    print(username + " from " + location + " has github " + github)
    print("Signatue: " + signature.text)
else:
    print("Could not get profile!")

profile.signature is a beautifulsoup4 object.

Next: Linking a user account to an external phpBB forum.

Comments

Leave comment

Shown publicly next to your comment. Leave blank to show as "Anonymous".
Optional, to notify you if rubenwardy replies. Not shown publicly.
Max 1800 characters. You may use plain text, HTML, or Markdown.