You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
511 B
Python
23 lines
511 B
Python
from selenium import webdriver
|
|
from bs4 import BeautifulSoup
|
|
import re
|
|
|
|
driver = webdriver.Chrome() # Make sure ChromeDriver is installed
|
|
driver.get('https://www.snapchat.com/add/topxbabes')
|
|
|
|
import time
|
|
time.sleep(1)
|
|
|
|
html_content = driver.page_source
|
|
driver.quit()
|
|
|
|
pattern = r'"mediaPreviewUrl":\{"value":"(https://.*?)"}'
|
|
matches = re.findall(pattern, html_content)
|
|
|
|
if matches:
|
|
print("Extracted Embed Links:")
|
|
for link in matches:
|
|
print(link)
|
|
else:
|
|
print("No embed links were found.")
|