CARVIEW |
Select Language
HTTP/2 200
date: Tue, 29 Jul 2025 17:34:27 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"ff994747c5b874cc6c60f73ac8e2b524"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=zMjD7mzvEhoTUJwKiZ1ilUl4VdGtgkIjVZ%2BLJn63pgi7x5D%2BufiJVR6crCKLjYOS9krqz5pA7SOG9f9OX1XwRaHMSmSHz6RsmhSGrc7ochO7hUdxJqXpI6o31Qcjg9eDAFLgTS4CRZgUcZIsGf3mMQlAWUDHcA9Oko44wXIN3662CyaKCTNDKClicNeW9EK3v1A8K1Rmp%2FJHrY2T83MMWkrxUaQdNsuJ2YyFJ54DZqlTq08BpXsB9JmqlFjgT1xPP3yUAWtvp1ooVAEMiFlmGA%3D%3D--y8TrvRE4nhqUKrUb--bmLUg4BwNedMANioJbfJ7w%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.455290676.1753810467; Path=/; Domain=github.com; Expires=Wed, 29 Jul 2026 17:34:27 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Wed, 29 Jul 2026 17:34:27 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 8302:8019C:E904EE:1136E8C:68890623
List groups.io subscriptions for a given email and pwd · GitHub
Show Gist options
Save valeriocos/ad33a0b9b2d13a8336230c8c59df3c55 to your computer and use it in GitHub Desktop.
{{ message }}
Instantly share code, notes, and snippets.
Last active
June 20, 2025 11:18
-
Star
2
(2)
You must be signed in to star a gist -
Fork
2
(2)
You must be signed in to fork a gist
-
Save valeriocos/ad33a0b9b2d13a8336230c8c59df3c55 to your computer and use it in GitHub Desktop.
List groups.io subscriptions for a given email and pwd
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
# -*- coding: utf-8 -*- | |
# | |
# Copyright (C) 2015-2020 Bitergia | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
# | |
# You should have received a copy of the GNU General Public License | |
# along with this program; if not, write to the Free Software | |
# Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA. | |
# | |
# Authors: | |
# Valerio Cosentino <valcos@bitergia.com> | |
# Abhishek Singh <abhiandthetruth@gmail.com> | |
# | |
import requests | |
GROUPSIO_API_URL = 'https://groups.io/api/v1/' | |
LOGIN = 'login' | |
GET = 'get' | |
POST = 'post' | |
GET_SUBSCRIPTIONS = 'getsubs' | |
GET_PERMISSIONS = 'getperms' | |
PER_PAGE = 100 | |
session = requests.Session() | |
def urijoin(*args): | |
"""Joins given arguments into a URI. | |
:returns: a URI string | |
""" | |
return '/'.join(map(lambda x: str(x).strip('/'), args)) | |
def fetch(url, payload, method=GET): | |
"""Fetch requests from groupsio API""" | |
if method == POST: | |
r = session.post(url, data=payload) | |
else: | |
r = session.get(url, params=payload) | |
try: | |
r.raise_for_status() | |
except requests.exceptions.HTTPError as e: | |
raise e | |
return r | |
def get_download_permission(group, login=False, email='xxxx', password='xxx'): | |
if login: | |
payload = { | |
'email': email, | |
'password': password | |
} | |
url = urijoin(GROUPSIO_API_URL, LOGIN) | |
fetch(url, payload, method=POST) | |
url = urijoin(GROUPSIO_API_URL, GET_PERMISSIONS) | |
keep_fetching = True | |
payload = { | |
"group_name": group, | |
} | |
r = fetch(url, payload) | |
response_raw = r.json() | |
return response_raw['download_archives'] | |
def get_subscriptions(email, password): | |
payload = { | |
'email': email, | |
'password': password | |
} | |
url = urijoin(GROUPSIO_API_URL, LOGIN) | |
fetch(url, payload, method=POST) | |
url = urijoin(GROUPSIO_API_URL, GET_SUBSCRIPTIONS) | |
keep_fetching = True | |
payload = { | |
"limit": PER_PAGE | |
} | |
while keep_fetching: | |
r = fetch(url, payload) | |
response_raw = r.json() | |
subscriptions = response_raw['data'] | |
for sub in subscriptions: | |
print(sub['group_name'] + ' , download archives: ' + str(get_download_permission(group=sub['group_name']))) | |
payload['page_token'] = response_raw['next_page_token'] | |
keep_fetching = response_raw['has_more'] | |
def main(): | |
groups_io_email = input('Enter your email: ') | |
groups_io_password = input('Enter your password: ') | |
print("***** ***** ***** *****") | |
get_subscriptions(groups_io_email, groups_io_password) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can’t perform that action at this time.