-
-
Save codingo/9d12086b789a362aa09edbe8ff1082c7 to your computer and use it in GitHub Desktop.
Grab all Plugins for drupal via drupal gitlab.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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