Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. import requests
  2. from bs4 import BeautifulSoup
  3. import re
  4.  
  5. response = requests.get('https://www.prettylittlething.com/taupe-faux-fur-military-coat.html').text
  6. soup = BeautifulSoup(response, 'html.parser')
  7. script = soup.find(text=re.compile('var pltProductData'))
  8. result = str(re.findall(r'"(https:\\\\\\/\\\\\\/cdn-img[^"]*)\\"', script)).replace('\\', '')
  9. print(result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement