ArmindoFlores / ao3_api

An unofficial archiveofourown.org (AO3) API for python
MIT License
166 stars 64 forks source link

Calling values for hits in the search function does not appear to impact the outcome. #63

Closed aconover42 closed 2 years ago

aconover42 commented 2 years ago

When using the Search function, one can call hits using a Constraint value, to refine the search by the number of hits the fics are allowed to have to be returned. However, it seems that this does not actually affect the search results, as far as I can tell from testing different permutations of the below code. The other functions that rely on Constraint values function as intended, but when searching for hits the results returned ignore the hits value while still following any other parameters given.

search = AO3.Search(hits = AO3.utils.Constraint(1700,1725))
search.update()
print(search.total_results)
for result in search.results:
  print("{} has {} hits".format(result.title, result.hits))