Untappd Scraper
Web scrape public Untappd pages into data classes.
Quickstart
User queries
from untappd_scraper.user import User
users = ["gregavola"]
for user_id in users:
user = User(user_id)
print(f"\n{user.name=}")
for checkin in user.activity():
print(f"\n\t{checkin.name=}\n\t\t{checkin}")
print("\n\nLists:")
for userlist in user.lists():
print(f"\n\t{userlist.name=} {userlist.num_items=}")
print("\n\nRecent Venues:")
for venue in user.venue_history():
ago = datetime.now().date() - venue.last_visit
print(
f"\n\t{venue.name=} {venue.last_visit.strftime('%b %d %Y')} "
+ f"({ago.days} days ago)"
)```
print("\n\nRecent Uniques:")
for beer in user.beer_history():
print(f"\t{beer}, {beer.total_checkins=}")
Venue queries
from untappd_scraper.venue import Venue
venue_ids = [
14705, # 4 pines
99967, # collaroy
]
for venue_id in venue_ids:
venue = Venue(venue_id)
print(f"\n{venue.name=}")
for num, checkin in enumerate(venue.activity(), start=1):
print(f"\n\t{num=}\t{checkin.name=}\n\t\t{checkin}")
# Load a venue by name. Try to be as unambiguous as possible
venue = Venue.from_name("hotel sweeney")
print(f"\n{venue.name=} {venue.verified=}\t{venue.categories=}\n")
print("\n".join([str(beer) for beer in venue.activity()]))
for menu in venue.menus():
print(f"\n{menu.selection=} / {menu.name=}")
print("\n\t\t", end="")
print("\n\t\t".join(str(beer) for beer in menu.beers))
Notes
untappd-scraper is just that - a scraper. It doesn't store data. So, for example,
if you query a user's unique beer history (with User.beer_history()) you will not
be able to see the entire history. Just what is public on the web, which is the most
recent 25 uniques.
Release files for untappd-scraper 0.17.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| untappd_scraper-0.17.3.tar.gz | 369.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| untappd_scraper-0.17.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 405.5 kB
Release files / untappd_scraper-0.17.3.tar.gz
| Download URL | untappd_scraper-0.17.3.tar.gz |
|---|---|
| Size | 369.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
90c0ff0350a7fd3955a90ffba24fd4bb89946eb5777c16a5ea070945ef420188
|
|
BLAKE2b-256 checksum How to use checksums |
2a076cc9c2a75075b89585ac5c351e19d663a06bb51b1b78355053d75dee3d83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / untappd_scraper-0.17.3-py3-none-any.whl
| Download URL | untappd_scraper-0.17.3-py3-none-any.whl |
|---|---|
| Size | 35.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
136b2ce9e004edc29b613fa268547b78a88e1f1369fd19dcc281fecc0a2582fb
|
|
BLAKE2b-256 checksum How to use checksums |
c727c98e26f85998e1e617a5b23552a6ef8727fb4757a574b8446a2938616d49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|