Skip to content

Instantly share code, notes, and snippets.

@YasserGersy
Created November 19, 2018 14:49
Show Gist options
  • Save YasserGersy/0a27c5d0389df800d5fdf6da292b3dfd to your computer and use it in GitHub Desktop.
Save YasserGersy/0a27c5d0389df800d5fdf6da292b3dfd to your computer and use it in GitHub Desktop.
Get List of php and python functions
import requests
r=requests.get('http://php.net/manual/en/indexes.functions.php')
res=""
for p in r.text.encode('utf-8').split('<a href="'):
if p.startswith('function'):
z=(p.split('"')[0].split('function.')[1]).replace('-','_')[0:-4]
res=res+z+"\r"
open('php_fun_names.txt','w').write(res)
t=requests.get('https://www.programiz.com/python-programming/methods').text.encode('utf-8')
bod=t.split('</a>')
pys=''
for y in bod:
if y.endswith(')'):
y=y.split('>Python')[-1]
y=y.split(' ')[-1][0:-2]
pys=pys+y+'\r'
open('python_fun_names.txt','w').write(pys)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment