Search
Searching the questions:
Warning! Either
intitle
ortagged
keyword arguments should be passed, otherwiseBadArgumentsError
is passed.
from pystackapi import Site
from pystackapi.sites import StackOverflow
site = Site(StackOverflow)
# Search for questions with word "Python" in title
about = site.search(intitle='Python')
q1 = about[0] # First returned question
# Search for questions with tag [python]
topic = site.search(tagged='Python')
q2 = topic[0]
print(f'{q1}\n')
print(f'{q2}\n')
Last updated