Skip to content

Instantly share code, notes, and snippets.

@RomaniukVadim
Created May 29, 2019 23:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RomaniukVadim/fb867109a1ec78b2950694c3abac8dcb to your computer and use it in GitHub Desktop.
Save RomaniukVadim/fb867109a1ec78b2950694c3abac8dcb to your computer and use it in GitHub Desktop.
Picture grabbing from hanime.tv
#!/bin/env python3
import urllib.request
import json
for i in list(range(10828)):
req = urllib.request.Request("http://www.hanime.tv/api/v3/community_uploads?channel_name__in[]=media&channel_name__in[]=nsfw_general&channel_name__in[]=yuri&__offset="+str(24*i)+"&__order=created_at,DESC", headers = {'X-Directive': 'api','User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0'})
opener = urllib.request.build_opener()
response = opener.open(req)
data = json.loads(response.read())['data']
for m in data:
print(m['url'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment