Skip to content

Commit

Permalink
Merge branch '109-rip-board-game-atlas' into 'master'
Browse files Browse the repository at this point in the history
Resolve "Remove Board Game Atlas scraper"

Closes #109

See merge request recommend.games/board-game-scraper!73
  • Loading branch information
MarkusShepherd committed Feb 11, 2024
2 parents d123b54 + fdf29c6 commit 1f09c7e
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 382 deletions.
3 changes: 0 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ LOG_LEVEL=DEBUG
LOG_SCRAPED_ITEMS=0
ROBOTSTXT_OBEY=1
SCRAPER_FILE_TAG=<hostname>
# get your Board Game Atlas credentials at https://www.boardgameatlas.com/api/docs/apps
BGA_CLIENT_ID=<client-id>
# you only need these settings if you want to prioritise certain BGG users
GOOGLE_APPLICATION_CREDENTIALS=/path/to/gs.json
# PubSub queue settings
Expand All @@ -24,7 +22,6 @@ AWS_ACCESS_KEY_ID=<access-key>
AWS_SECRET_ACCESS_KEY=<secret-access-key>
# limit downloaded images per game and spider
# use 0 to disable download; -1 for all images
LIMIT_IMAGES_TO_DOWNLOAD_BGA=0
LIMIT_IMAGES_TO_DOWNLOAD_BGG=0
LIMIT_IMAGES_TO_DOWNLOAD_DBPEDIA=0
LIMIT_IMAGES_TO_DOWNLOAD_LUDING=0
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ pip install board-game-scraper

## Sources

* [Board Game Atlas](https://www.boardgameatlas.com/) (`bga`)
* [BoardGameGeek](https://boardgamegeek.com/) (`bgg`)
* [DBpedia](https://wiki.dbpedia.org/) (`dbpedia`)
* [Luding.org](https://luding.org/) (`luding`)
Expand Down
2 changes: 0 additions & 2 deletions board_game_scraper/fields.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,3 @@
type: Exact
- field: spielen_id
type: Exact
- field: bga_id
type: Exact
13 changes: 0 additions & 13 deletions board_game_scraper/full_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,6 @@ def merge_configs(spider, full=False):

full = parse_bool(full)

if spider == "bga":
yield merge_config(spider="bga", item="GameItem", full=full)
yield merge_config(
spider="bga",
item="RatingItem",
full=full,
keys=("bga_user_id", "bga_id"),
fieldnames_exclude=("bgg_user_play_count",)
if parse_bool(full)
else ("bgg_user_play_count", "published_at", "updated_at", "scraped_at"),
)
return

if spider == "bgg":
yield merge_config(spider="bgg", item="GameItem", full=full)
yield merge_config(
Expand Down
11 changes: 0 additions & 11 deletions board_game_scraper/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,6 @@ class GameItem(TypedItem):
default=None,
)
spielen_id = Field(dtype=str)
bga_id = Field(dtype=str)

published_at = Field(
dtype=datetime,
Expand Down Expand Up @@ -628,16 +627,6 @@ class RatingItem(TypedItem):
dtype=int, dtype_convert=parse_int, input_processor=NN_INT_PROCESSOR, default=0
)

bga_id = Field(dtype=str)
bga_user_id = Field(dtype=str)
bga_user_name = Field(dtype=str, input_processor=MapCompose(identity, str))
bga_user_rating = Field(
dtype=float,
dtype_convert=parse_float,
default=None,
input_processor=POS_FLOAT_PROCESSOR,
)

comment = Field(
dtype=str,
input_processor=MapCompose(
Expand Down
11 changes: 0 additions & 11 deletions board_game_scraper/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
"dbpedia_id",
"luding_id",
"spielen_id",
"bga_id",
"published_at",
"updated_at",
"scraped_at",
Expand Down Expand Up @@ -129,10 +128,6 @@
"bgg_user_preordered",
"bgg_user_wishlist",
"bgg_user_play_count",
"bga_id",
"bga_user_id",
"bga_user_name",
"bga_user_rating",
"comment",
"published_at",
"updated_at",
Expand Down Expand Up @@ -297,12 +292,6 @@
CLEAN_ITEM_DROP_FALSEY = True
CLEAN_ITEM_DROP_VALUES = None

# Board Game Atlas
BGA_CLIENT_ID = os.getenv("BGA_CLIENT_ID")
BGA_SCRAPE_IMAGES = False
BGA_SCRAPE_VIDEOS = False
BGA_SCRAPE_REVIEWS = False

PULL_QUEUE_ENABLED = False
PULL_QUEUE_PROJECT = os.getenv("PULL_QUEUE_PROJECT")
PULL_QUEUE_SUBSCRIPTION = os.getenv("PULL_QUEUE_SUBSCRIPTION")
Expand Down
Loading

0 comments on commit 1f09c7e

Please sign in to comment.