Skip to content

Instantly share code, notes, and snippets.

@enzzc
Created December 2, 2018 19:59
Show Gist options
  • Save enzzc/d017928289e3d255d450d25fe430b01c to your computer and use it in GitHub Desktop.
Save enzzc/d017928289e3d255d450d25fe430b01c to your computer and use it in GitHub Desktop.
import requests
base_url = 'https://zestedesavoir.com'
endpoint = 'https://zestedesavoir.com/api/membres?page_size=1000'
endpoint_user = 'https://zestedesavoir.com/api/membres/{user_id}/'
r = requests.get(endpoint)
res = r.json()['results']
suspicious = [
'free',
'download',
'crack',
'hack',
]
for user in res:
user_id = user['id']
bio = requests.get(endpoint_user.format(user_id=user_id)).json()
bio = bio['biography'].lower()
if not bio:
continue
for w in suspicious: # c'est pas super optimisé, ouais...
if w in bio:
print(user_id, bio)
print(base_url + user['html_url'])
break
print()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment