<commit_before>module Pixiv
  class Member < Page
    # Returns the URL for given +member_id+
    # @param [Integer] member_id
    # @return [String]
    def self.url(member_id)
      "#{ROOT_URL}/member.php?id=#{member_id}"
    end

    # @return [String]
    lazy_attr_reader(:name) { at!('.profile_area h2').inner_text }
    # @return [Integer]
    lazy_attr_reader(:member_id) { at!('input[name="user_id"]')['value'].to_i }
    # return [Integer]
    lazy_attr_reader(:pixiv_id) { at!('.profile_area img')['src'][%r{/profile/([a-z_-]+)/}, 1] }


    alias id member_id

    # @return [String]
    def url; self.class.url(member_id) end
  end

  module Member::WithClient
    include Page::WithClient

    # (see Pixiv::Client#bookmark_list)
    def bookmark_list(page_num = 1)
      client.bookmark_list(self, page_num)
    end

    # (see Pixiv::Client#bookmarks)
    def bookmarks(page_num = 1, &block)
      client.bookmarks(self, page_num, &block)
    end
  end
end<commit_msg>Implement Member#profile_image_url<commit_after>module Pixiv
  class Member < Page
    # Returns the URL for given +member_id+
    # @param [Integer] member_id
    # @return [String]
    def self.url(member_id)
      "#{ROOT_URL}/member.php?id=#{member_id}"
    end

    # @return [String]
    lazy_attr_reader(:name) { at!('.profile_area h2').inner_text }
    # @return [Integer]
    lazy_attr_reader(:member_id) { at!('input[name="user_id"]')['value'].to_i }
    # @return [Integer]
    lazy_attr_reader(:pixiv_id) { profile_image_url[%r{/profile/([a-z_-]+)/}, 1] }
    # @return [String]
    lazy_attr_reader(:profile_image_url) { at!('.profile_area img')['src'] }


    alias id member_id

    # @return [String]
    def url; self.class.url(member_id) end
  end

  module Member::WithClient
    include Page::WithClient

    # (see Pixiv::Client#bookmark_list)
    def bookmark_list(page_num = 1)
      client.bookmark_list(self, page_num)
    end

    # (see Pixiv::Client#bookmarks)
    def bookmarks(page_num = 1, &block)
      client.bookmarks(self, page_num, &block)
    end
  end
end
{'fraction_non_alphanumeric': 0.14677574590952838, 'fraction_numerical': 0.0038498556304138597, 'mean_word_length': 3.5692307692307694, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5902557', 'n_tokens_mistral': 765, 'n_tokens_neox': 749, 'n_words': 142}