8 lines
482 B
Python
8 lines
482 B
Python
import requests as r
|
|
import regex
|
|
|
|
headers={'cookie':'privacy_policy_notification=0; p_ab_id=0; p_ab_id_2=6; p_ab_d_id=98792899; FANBOXSESSID=38848234_x16jnBtsVgjUX6NpW14obc5Odfq1tn6u; privacy_policy_agreement=3'} # This needs to be refreshed every time.
|
|
needle=regex.compile('(https://downloads\.fanbox\.cc/images/post/\d+/[a-zA-Z0-9]+\.[a-z]{3,4})')
|
|
|
|
blob=open('post.txt').read()
|
|
for a in needle.findall(blob): open(a[a.rfind('/')+1:],'wb').write(r.get(a,headers=headers).content) |