<jupyter_start><jupyter_text>Example 3: Build User Profile Watch History<jupyter_code>from youtubeauditframework.userprofiles.BuildUserWatchHistory import BuildUserWatchHistory

# Set the User Profile's nickname for which you want to build the Watch History
user_profile = 'USER_PROFILE_NICKNAME'<jupyter_output><empty_output><jupyter_text>1. Create an object of the helper class for building the User Profile's Watch History<jupyter_code>buildUserWatchHistoryHelper = BuildUserWatchHistory(user_profile=user_profile)<jupyter_output><empty_output><jupyter_text>2. Build the User's Watch History**OPTION 1:** Build the watch history of the user profile, but first create a file with the following naming convention```_watch_history_videos.txt```, which includes all the YouTube Video IDs separated by breakline (Enter Key). Store this file inside the ```youtubeauditframework/userprofiles/info/``` directory.<jupyter_code># Start building the watch history of the user profile
buildUserWatchHistoryHelper.build_watch_history()<jupyter_output><empty_output><jupyter_text>**Option 2:** Build the watch history of the user profile by providing a list of minimum 100 YouTube Video IDs.<jupyter_code># Create the list with the YouTube videos that the profile will use to build a watch history
watch_history_videos = ['YOUTUBE_VIDEO_ID', 'YOUTUBE_VIDEO_ID', 'YOUTUBE_VIDEO_ID']

# Start building the watch history of the user profile
buildUserWatchHistoryHelper.build_watch_history(watch_videos_list=watch_history_videos)<jupyter_output><empty_output><jupyter_text>3. Ensure that the browser has closed<jupyter_code>buildUserWatchHistoryHelper.close_selenium_browser()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.06859846244825547, 'fraction_numerical': 0.005322294500295683, 'mean_word_length': 8.837209302325581, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '77785', 'license': 'MIT', 'n_tokens_mistral': 500, 'n_tokens_neox': 481, 'n_words': 150, 'path': 'examples/build_user_profile_watch_history.ipynb', 'repo_name': 'kinit-sk/pseudoscience-paper', 'size': '1691'}