User

insert_link hentai.Page

A dataclass that bundles related User properties. See also the documentation for dataclass on python's docs page or self.thread.

Properties

insert_link self.id -> int

Returns the ID of this User object.

            
                from hentai import Hentai

                doujin = Hentai(177013)
                
                # get first comment posted
                comment = doujin.thread[-1]

                # access user data of this poster
                first_poster = comment.poster

                # 572666
                print(first_poster.id)
            
        
insert_link self.username -> str

Returns the username of this User object.

            
                from hentai import Hentai

                doujin = Hentai(177013)
                
                # get first comment posted
                comment = doujin.thread[-1]

                # access user data of this poster
                first_poster = comment.poster

                # devil_arm
                print(first_poster.username)
            
        
insert_link self.slug -> str

Returns the slug of this User object.

            
                from hentai import Hentai

                doujin = Hentai(177013)
                
                # get first comment posted
                comment = doujin.thread[-1]

                # access user data of this poster
                first_poster = comment.poster

                # devil_arm
                print(first_poster.slug)
            
        
insert_link self.avatar_url -> str

Returns the avatar URL of this User object.

            
                from hentai import Hentai

                doujin = Hentai(177013)
                
                # get first comment posted
                comment = doujin.thread[-1]

                # access user data of this poster
                first_poster = comment.poster

                # i.nhentai.net/avatars/572666.png
                print(first_poster.avatar_url)
            
        
insert_link self.is_superuser -> bool

Determines whether this User object is equipped with superuser privileges.

            
                from hentai import Hentai

                doujin = Hentai(177013)
                
                # get first comment posted
                comment = doujin.thread[-1]

                # access user data of this poster
                first_poster = comment.poster
                
                # False
                print(first_poster.is_superuser)
            
        
insert_link self.is_staff -> bool

Determines whether this User object is equipped with staff privileges.

            
                from hentai import Hentai

                doujin = Hentai(177013)
                
                # get first comment posted
                comment = doujin.thread[-1]

                # access user data of this poster
                first_poster = comment.poster
                
                # False
                print(first_poster.is_staff)
            
        
insert_link self.poster_url -> str

Returns the poster URL of this User object.

            
                from hentai import Hentai

                doujin = Hentai(177013)
                
                # get first comment posted
                comment = doujin.thread[-1]

                # access user data of this poster
                first_poster = comment.poster
                
                # https://nhentai.net/users/572666/devil_arm
                print(first_poster.url)