ButtonWidget¶
-
class
praw.models.
ButtonWidget
(reddit, _data)¶ Class to represent a widget containing one or more buttons.
Find an existing one:
button_widget = None widgets = reddit.subreddit('redditdev').widgets for widget in widgets.sidebar: if isinstance(widget, praw.models.ButtonWidget): button_widget = widget break for button in button_widget: print(button.text, button.url)
-
__contains__
(item)¶ Test if item exists in the list.
-
__getitem__
(index)¶ Return the item at position index in the list.
-
__iter__
()¶ Return an iterator to the list.
-
__len__
()¶ Return the number of items in the list.
-