我正在使用praw reddit库从reddit中提取数据,我遇到了一些我不明白为什么它会返回任何数据的代码(在类BaseReddit(完整源代码)中):
def get_content(self, page_url, limit=0, url_data=None, place_holder=None,
root_field='data', thing_field='children',
after_field='after'):
"""A generator method to return reddit content from a URL. Starts at
the initial page_url, and fetches content using the `after` JSON data
until `limit` entries have been fetched, or the `place_holder` has been
reached.
:param page_url: the url to start fetching content from
:param limit: the maximum number of content entries to fetch. If
limit <= 0, fetch the default_content_limit for the site. If None, …Run Code Online (Sandbox Code Playgroud)