Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
daprofiler
GitHub Repository: daprofiler/DaProfiler
Path: blob/main/modules/social_medias/wattpad_search.py
235 views
1
import time, colorama
2
from colorama import Fore
3
from selenium import webdriver
4
5
def wattpad_module(pren,name):
6
print("📔 Searching for Wattpad profiles ...")
7
options = webdriver.FirefoxOptions()
8
options.headless = True
9
driver = webdriver.Firefox(options=options)
10
url = "https://www.wattpad.com/search/{}%20{}/people".format(pren,name)
11
driver.get(url)
12
time.sleep(2.0)
13
source_code = str(driver.page_source)
14
15
if "Hmmm... il n'y a pas de résultats" in source_code:
16
return None
17
else:
18
print(f' -> {Fore.GREEN}Found !{Fore.RESET} Visit : {url}')
19