Closed Wrench-wench closed 3 years ago
The correct usage should be
search_result = AO3.Search(title="The Real Meaning of Idioms")
search_result.update()
print(search_result.results)
which gets you this result:
[<Work [The Real Meaning of Idioms]>, <Work [[PODFIC] The Real Meaning of Idioms]>, <Work [Cover for The Real Meaning of Idioms]>]
Thank you for the response, would you have a suggested way of getting the workID or URL from a title?
I don't think there's really a way around searching and selecting one of the results. After you have them, you can use something like search_result.results[0].workid
to get the ID of the first one.
It's close enough to what I need. Cheers!
When searching for a work via it's title the search results return as something I don't understand. Searching the code doesn't reveal anything about how the results are returned or supposed to be understood.
Returns this result in the terminal: <AO3.search.Search object at 0x7f5ab4ea6100>
I did at first think this was due to a title collision, but have tested this will multiple different titles.