Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # pinterest_bulkdown.py
- import re, urllib
- try:
- import urllib.request # this is if you are running on Python 3
- except:
- pass
- sites='''
- https://www.pinterest.com/pin/123456789012345678/
- https://www.pinterest.com/pin/999999999999999999/...
- '''
- sites=sites.strip().splitlines()
- for s in sites:
- try: u = urllib.urlopen(s)
- except:
- try: u = urllib.request.urlopen(s)
- except: pass
- if u:
- text = u.read()
- for z in ['media-cache-ak0.pinimg.com/assets/js/warm','media-cache-ak0.pinimg.com/600x315','media-cache-ak0.pinimg.com/736x']:
- text=text.replace(z,'')
- while 1:
- try: text=text[text.index('media-cache')-16:]
- except:
- print '!!!'
- break
- if '.com/originals' in text[:60]:
- text=text[text.index('"')+1:]
- text=text[:text.index('"')]
- print text
- break
- else:
- print '!!!!!!!!!' # not connected?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement