문제

Is it possible to detect whether a user's submission on reddit is either a self-post or a link to an external URL? I want to exclude all self-posts but can seem to find anything in PRAW's documentation.

도움이 되었습니까?

해결책

All of the attributes listed in the json data of the following URL are available as attributes:

http://www.reddit.com/r/pics/.json?limit=1

The attribute you might be interested in specifically is is_self. In PRAW, you need only test submission.is_self.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top