Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FILE_EXTENTIONS = 'png', 'jpg'
- files = filter(
- None,
- (p.get('files') for p in req['threads'][0]['posts'])
- )
- prefix = urli.rsplit('/', 2)[0] + '/'
- paths = (
- prefix + path
- for path in (f[0]['path'] for f in files)
- if any(map(path.endswith, FILE_EXTENTIONS))
- )
- for p in paths:
- label1['text'] = 'download ' + p
- # ...
Advertisement
Add Comment
Please, Sign In to add comment