-3

I need to extract all available javascript files over all the projects available on github using python.I looked for an API in github and I found this : https://developer.github.com/v3/ I don't understand what kind of requests do I have to send and how do I compose the URL.I would prefer not depending on another 3rd party API if possible. Please guide me in the right direction,Any help would be appreciated!!

Sharang Gupta
  • 277
  • 1
  • 2
  • 14

1 Answers1

-1

To gather the files you can use this in your python script:

import os 
os.system("curl -o https://github.com/file.js") 

Replace the URL with the individual file name, or in your case a variable in your loop to grab all files from a repo. You will need to repeat this for each org/user/repo/etc

Download remote files using curl

Running shell commands from python

Community
  • 1
  • 1
Vinnie James
  • 4,816
  • 4
  • 33
  • 47