Skip to content

Instantly share code, notes, and snippets.

@random-robbie
Created April 1, 2020 10:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save random-robbie/c802a671f9eb8669afae1039ed00f989 to your computer and use it in GitHub Desktop.
Save random-robbie/c802a671f9eb8669afae1039ed00f989 to your computer and use it in GitHub Desktop.
Grab all Plugins for drupal via drupal gitlab.
import requests
import json
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
session = requests.Session()
http_proxy = "http://192.168.1.130:8085"
proxyDict = {
"http" : http_proxy,
"https" : http_proxy,
"ftp" : http_proxy
}
def grab_names(number):
print ("[*] Grabbing Page "+str(number)+" [*]")
paramsGet = {"page":""+str(number)+"","sort":"created_desc"}
headers = {"User-Agent":"curl/7.64.1","Connection":"close","Accept":"*/*"}
response = session.get("https://git.drupalcode.org/groups/project/-/children.json", params=paramsGet, headers=headers,verify=False, proxies=proxyDict)
json_st = json.loads(response.content)
if response.status_code == 200:
for name in json_st:
print (name['name'])
text_file = open("plugins.txt", "a")
text_file.write(""+str(name['name'])+"\n")
text_file.close()
for number in range(1,1568):
grab_names(number)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment