[google+] download original photos

This commit is contained in:
Mort Yao 2017-07-08 03:12:22 +02:00
parent 490514eae6
commit bfdc08e6a1
No known key found for this signature in database
GPG Key ID: 07DA00CB78203251

View File

@ -60,6 +60,7 @@ def google_download(url, output_dir = '.', merge = True, info_only = False, **kw
real_urls.append(u)
if not real_urls:
real_urls = [r1(r'<meta property="og:image" content="([^"]+)', html)]
real_urls = [re.sub(r'w\d+-h\d+-p', 's0', u) for u in real_urls]
post_date = r1(r'"(20\d\d-[01]\d-[0123]\d)"', html)
post_id = r1(r'/posts/([^"]+)', html)
title = post_date + "_" + post_id