confidence, channels = ytb.get_confidence(data, name, hash) if confidence: print(f"\nYouTube channel (confidence => {confidence}%) :") for channel in channels: print(f"- [{channel['name']}] {channel['profile_url']}") possible_usernames = ytb.extract_usernames(channels) if possible_usernames: print("\nPossible usernames found :") for username in possible_usernames: print(f"- {username}") else: print("\nYouTube channel not found.") # TODO: return gpics function output here gpics(gaiaID, client, cookies, config.headers, config.regexs["albums"], config.regexs["photos"], config.headless) # reviews reviews = gmaps.scrape(gaiaID, client, cookies, config.headers, config.regexs["review_loc_by_id"], config.headless) if reviews: confidence, locations = gmaps.get_confidence(reviews, config.gmaps_radius) print(f"\nProbable location (confidence => {confidence}) :") loc_names = [] for loc in locations: loc_names.append( f"- {loc['avg']['town']}, {loc['avg']['country']}" ) loc_names = set(loc_names) # delete duplicates
req = client.get(profil_pic) img = Image.open(BytesIO(req.content)) hash = image_hash(img) data = ytb.get_channels(client, name, cfg) if not data: print("\nYoutube channel not found.") else: confidence, channels = ytb.get_confidence(data, name, hash) if confidence: print(f"\nYoutube channel (confidence => {confidence}%) :") for channel in channels: print(f"- [{channel['name']}] {channel['profil_url']}") possible_usernames = ytb.extract_usernames(channels) if possible_usernames: print("\nPossible usernames found :") for username in possible_usernames: print(f"- {username}") else: print("\nYoutube channel not found.") gpics(gaiaID, client, cookies, cfg) reviews = gmaps.scrape(gaiaID, client, cookies, cfg) if reviews: confidence, locations = gmaps.get_confidence(reviews, cfg) print(f"\nProbable location (confidence => {confidence}) :") loc_names = [] for loc in locations: loc_names.append(f"- {loc['avg']['town']}, {loc['avg']['country']}") loc_names = set(loc_names) # We delete duplicates for loc in loc_names: print(loc)
ytb_hunt = True print("Unable to fetch connected Google services.") if ytb_hunt or cfg["ytb_hunt_always"]: req = client.get(profil_pic) img = Image.open(BytesIO(req.content)) hash = image_hash(img) data = ytb.get_channels(client, name, cfg) if not data: print("\nYoutube channel not found.") else: confidence, channels = ytb.get_confidence(data, name, hash) if confidence: print(f"\nYoutube channel (confidence => {confidence}%) :") for channel in channels: print(f"- [{channel['name']}] {channel['profil_url']}") possible_usernames = ytb.extract_usernames(channels) if possible_usernames: print("\nPossible usernames found :") for username in possible_usernames: print(f"- {username}") else: print("\nYoutube channel not found.") gpics(gaiaID, client, cfg) reviews = gmaps.scrape(gaiaID, client, cookies, cfg) if reviews: confidence, locations = gmaps.get_confidence(reviews, cfg) print(f"\nProbable location (confidence => {confidence}) :") for loc in locations: print(f"- {loc['avg']['town']}, {loc['avg']['country']}")