Skip to content

Commit

Permalink
Ignore box office lists
Browse files Browse the repository at this point in the history
Pages like "Top 10 box office hits of 2023 in Germany" don't indicate
much of a connection between the media in their lists.
  • Loading branch information
dseomn committed Nov 15, 2023
1 parent e861970 commit 9b1ea51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions rock_paper_sand/wikidata.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ def _ignored_items(self) -> Set[wikidata_value.ItemRef]:
@functools.cached_property
def _ignored_classes(self) -> Set[wikidata_value.ItemRef]:
return {
*self._api.transitive_subclasses(wikidata_value.Q_BOX_OFFICE),
*self._fictional_entity_classes,
*self._api.transitive_subclasses(wikidata_value.Q_LIST),
# "to be announced" <https://www.wikidata.org/wiki/Q603908> is
Expand Down
1 change: 1 addition & 0 deletions rock_paper_sand/wikidata_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def human_readable_url_prefix(cls) -> str:

_i = ItemRef.from_string
Q_ANTHOLOGY = _i("https://www.wikidata.org/wiki/Q105420")
Q_BOX_OFFICE = _i("https://www.wikidata.org/wiki/Q21707777")
Q_CLASS_OF_FICTIONAL_ENTITIES = _i("https://www.wikidata.org/wiki/Q15831596")
Q_FICTIONAL_ENTITY = _i("https://www.wikidata.org/wiki/Q14897293")
Q_FICTIONAL_UNIVERSE = _i("https://www.wikidata.org/wiki/Q559618")
Expand Down

0 comments on commit 9b1ea51

Please sign in to comment.