Skip to main content

pypi unit-tests

Python PSNProfiles scraper

Scrape PSNProfiles profile pages using a Python CLI script

Installation

Install Python>=3.9 then in a terminal:

git clone https://github.com/robiningelbrecht/psnprofiles-scraper
pip install -r requirements.txt
python main.py YourUserName (-d)

Or install from PyPi

pip install psnprofiles_scraper

Usage

from psnprofiles_scraper.src.PsnProfilesScraper import PsnProfilesScraper

scraper = PsnProfilesScraper()
# 2nd param indicates if a detailed "scrape" should be executed, takes longer to finish.
print(scraper.get_profile("YourUsername", False).to_json())

Example JSON output

{
  "name": "YourUserName",
  "country": "Belgium",
  "avatar": "https://i.psnprofiles.com/avatars/m/Gc0466d545.png",
  "summary": {
    "level": 354,
    "trophies": {
      "total": 2578,
      "grade": {
        "platinum": 66,
        "gold": 576,
        "silver": 583,
        "bronze": 1353
      },
      "rarity": {
        "ultra_rare": 4,
        "very_rare": 10,
        "rare": 39,
        "uncommon": 406,
        "common": 2119
      }
    },
    "points": {
      "platinum": 19800,
      "gold": 51840,
      "silver": 17490,
      "bronze": 20295,
      "total": 109425
    },
    "games": {
      "played": 165,
      "completed": 61,
      "platforms": {
        "PS5": 4,
        "PS4": 157,
        "PS3": 0,
        "PS Vita": 0,
        "Multiplatform": 4
      },
      "ranks": {
        "S": 61,
        "A": 12,
        "B": 11,
        "C": 14,
        "D": 12,
        "E": 36,
        "F": 19
      }
    },
    "stats": {
      "completion": {
        "average": "56.92%",
        "80% - 100%": 66,
        "60% - 79.99%": 15,
        "40% - 59.99%": 12,
        "20% - 39.99%": 14,
        "0% - 19.99%": 58
      },
      "unearned_trophies": 2685,
      "trophies_per_day": "2.25",
      "views": 501,
      "world_rank": 112163,
      "country_rank": 1486
    }
  },
  "recent_trophies": [
    {
      "title": "Luna's Apprentice",
      "description": "Concrete Genie",
      "rarity_percentage": "90.93%",
      "rarity_label": "Common",
      "grade": "bronze",
      "icon_uri": "https://i.psnprofiles.com/games/e17609/trophies/2Se1a8c6.png",
      "obtained": true
    },
    {
      "title": "Path of the Stars",
      "description": "Shadow of the Tomb Raider",
      "rarity_percentage": "94.29%",
      "rarity_label": "Common",
      "grade": "bronze",
      "icon_uri": "https://i.psnprofiles.com/games/e17609/trophies/2Se1a8c6.png",
      "obtained": true
    }
  ],
  "rarest_trophies": [
    {
      "title": "Blue Series clear",
      "description": "Trackmania Turbo",
      "rarity_percentage": "3.28%",
      "rarity_label": "Ultra Rare",
      "grade": "silver",
      "icon_uri": "https://i.psnprofiles.com/games/4d4c0b/trophies/17S023638.png",
      "obtained": true
    },
    {
      "title": "Stadium Blue clear",
      "description": "Trackmania Turbo",
      "rarity_percentage": "3.45%",
      "rarity_label": "Ultra Rare",
      "grade": "bronze",
      "icon_uri": "https://i.psnprofiles.com/games/4d4c0b/trophies/33Sd54d43.png",
      "obtained": true
    }
  ],
  "milestones": [
    {
      "trophy": "Dragon Break Classic master",
      "trophy_icon": "https://i.psnprofiles.com/games/4d4c0b/trophies/33Sd54d43.png",
      "game": "Dragon Break Classic",
      "description": "Latest Platinum",
      "date": "6 days ago"
    },
    {
      "trophy": "Projectile Pro",
      "trophy_icon": "https://i.psnprofiles.com/games/4d4c0b/trophies/33Sd54d43.png",
      "game": "Immortals Fenyx Rising",
      "description": "2,500th Trophy",
      "date": "4 weeks ago"
    },
    {
      "trophy": "Platinum Paw",
      "trophy_icon": "https://i.psnprofiles.com/games/4d4c0b/trophies/33Sd54d43.png",
      "game": "Thunder Paw",
      "description": "50th Platinum",
      "date": "8 months ago"
    },
    {
      "trophy": "Thank you Mr. Kitty!",
      "trophy_icon": "https://i.psnprofiles.com/games/4d4c0b/trophies/33Sd54d43.png",
      "game": "Red Bow",
      "description": "2,000th Trophy",
      "date": "8 months ago"
    }
  ],
  "games": [
    {
      "title": "Assassin's Creed Syndicate",
      "trophy_stats": {
        "obtained": "32",
        "total": "57",
        "gold": "2",
        "silver": "5",
        "bronze": "25",
        "completion": "56%"
      },
      "platform": "PS4",
      "rank": "B",
      "has_earned_platinum": false,
      "thumbnail_uri": "https://i.psnprofiles.com/games/79c5a1/Sd24d1d.png",
      "uri": "https://psnprofiles.com/trophies/3992-assassins-creed-syndicate/YourUsername"
    },
    {
      "title": "My Name is Mayo",
      "trophy_stats": {
        "obtained": "51",
        "total": "51",
        "gold": "4",
        "silver": "0",
        "bronze": "46",
        "completion": "100%"
      },
      "platform": "PS4",
      "rank": "S",
      "has_earned_platinum": true,
      "thumbnail_uri": "https://i.psnprofiles.com/games/79c5a1/Sd24d1d.png",
      "uri": "https://psnprofiles.com/trophies/5531-my-name-is-mayo/YourUsername"
     }
  ],
  "trophy_cabinet": [
    {
      "title": "Be Yourself",
      "description": "Marvel's Spider-Man: Miles Morales",
      "rarity_percentage": "56.11%",
      "rarity_label": "Common",
      "grade": "platinum",
      "icon_uri": "https://i.psnprofiles.com/games/e17609/trophies/2Se1a8c6.png",
      "obtained": true
    },
    {
      "title": "Viking Legend",
      "description": "Assassin's Creed Valhalla",
      "rarity_percentage": "15.91%",
      "rarity_label": "Rare",
      "grade": "platinum",
      "icon_uri": "https://i.psnprofiles.com/games/e17609/trophies/2Se1a8c6.png",
      "obtained": true
    }
  ],
  "level_history": [
    {
      "level": 20,
      "game": {
        "title": "Assassins Creed Syndicate",
        "thumbnail_uri": "https://i.psnprofiles.com/games/c2af51/S7d1b26.png"
      },
      "trophy": {
        "title": "Bare-Knuckle Champion",
        "description": "Win three different Fight Clubs.",
        "icon_uri": "https://i.psnprofiles.com/games/c2af51/trophies/16Sa76145.png"
      },
      "date": "12th May 2018 10:54:10 AM"
    },
    {
      "level": 10,
      "game": {
        "title": "Assassins Creed Iv Black Flag",
        "thumbnail_uri": "https://i.psnprofiles.com/games/cc3b08/S359338.png"
      },
      "trophy": {
        "title": "Barfly",
        "description": "Unlock all taverns.",
        "icon_uri": "https://i.psnprofiles.com/games/cc3b08/trophies/36Sbcace5.png"
      },
      "date": "29th Apr 2018 9:12:16 AM"
    }
  ]
}

Disclaimer

This app and its creator have no affiliation with PSNProfiles or the PlayStation Network/PlayStation beyond the creator’s use of both services.

Metadata

Release files for psnprofiles_scraper 1.3.2

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

Source distribution (sdist)

Source distribution for psnprofiles_scraper 1.3.2
File Size Uploaded Provenance Actions
psnprofiles_scraper-1.3.2.tar.gz 12.3 kB Without provenance Details for psnprofiles_scraper-1.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for psnprofiles_scraper 1.3.2
File Interpreter ABI Platform Actions
psnprofiles_scraper-1.3.2-py3-none-any.whl Python 3 none any Details for psnprofiles_scraper-1.3.2-py3-none-any.whl

Total release size: 26.8 kB

Release files / psnprofiles_scraper-1.3.2.tar.gz

Download URL psnprofiles_scraper-1.3.2.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e6cec7da8ba07fe886c818db6a163d7b1affb61ffdf12bbca23d9094974e7679
BLAKE2b-256 checksum
How to use checksums
174cfc40b19ce07a1aa8d40e747e644273e0ab5b010d388709689dcf73760dbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Release files / psnprofiles_scraper-1.3.2-py3-none-any.whl

Download URL psnprofiles_scraper-1.3.2-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81be5ae21ff1a91342ef904f9c87efabd4a8afde6b4fe6c3f071d5f0d3d741c4
BLAKE2b-256 checksum
How to use checksums
e49157b227f41e175372922200919adcb2cf9fb6dea41e3d71dcd261180af6c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Security for psnprofiles_scraper 1.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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