Skip to content

Commit

Permalink
Added developer.facebook.com API for Ninja mode
Browse files Browse the repository at this point in the history
  • Loading branch information
s0md3v authored Sep 17, 2018
1 parent ca787ff commit a2d1461
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion photon.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ def normal(url):
response.close()
return 'dummy'

# developer.facebook.com API
def facebook(url):
return get('https://developers.facebook.com/tools/debug/echo/?q=' + url, verify=False).text

# pixlr.com API
def pixlr(url):
if url == main_url:
Expand Down Expand Up @@ -248,7 +252,7 @@ def photopea(url):

if ninja: # if the ninja mode is enabled
# select a random request function i.e. random API
response = random.choice([photopea, normal, pixlr, code_beautify])(url)
response = random.choice([photopea, normal, facebook, pixlr, code_beautify])(url)
return response or 'dummy'
else:
return normal(url)
Expand Down

0 comments on commit a2d1461

Please sign in to comment.