Skip to content

georgehawkins0/openpowerlifting-fetch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openpowerlifting-fetch

Fetch the Competition History of a lifter from openipf.com

Table of contents

Installation

Clone the github repo

$ git clone https://github.com/georgehawkins0/openpowerlifting-fetch.git

Change Directory

$ cd openpowerlifting-fetch

Install Requirements

$ python3 -m pip install -r requirements.txt

Usage

Quick Start

Import Page

from fetcher import Page
  • Fetch from URL
# Create a Page object
page = Page(url='https://www.openipf.org/u/timothymonigatti')

data = page.get_data()
print(data)
  • Fetch from openIPF username
# Create a Page object
page = Page(username='timothymonigatti')

data = page.get_data()
print(data)

Request

Instantiating a page object as above automatically does the web request when created. If for some reason you want to make the object, but call the request at a different time, the following can be done:

page = Page(username='timothymonigatti', fetch=False)
...
page.fetch()
data = page.get_data()

Or just

page = Page(username='timothymonigatti', fetch=False)
...
data = page.get_data() # Auto calls fetch if not fetched before

Data Refresh

If you want to refresh the data in the object, you can

page = Page(username='timothymonigatti')
...
data = page.get_data(refresh_data=True) # Auto calls fetch if not fetched before

Returned is the full list of competitons, with each having the the keys:

  • Place
  • Fed
  • Date
  • Location
  • Competition
  • Division
  • Age
  • Equip
  • Class
  • Weight
  • Squat
  • Bench
  • Deadlift
  • Total
  • GLP/Dots (OpenIPF.com vs OpenPowerlifting.com)

About

an OpenPowerlifting/OpenIPF.com unofficial API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages