Getting user profile data from external phpBB forums

Programming Projects Tutorials

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("", 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)
print("Could not get profile!")

profile.signature is a beautifulsoup4 object.

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