Skip to content

Commit 341c2be

Browse files
new test
1 parent 78800c4 commit 341c2be

File tree

2 files changed

+10
-41
lines changed

2 files changed

+10
-41
lines changed

main.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
import requests
2-
import logging
32

4-
logging.basicConfig(filename='open-source.txt',
5-
level=logging.INFO, format='%(asctime)s - %(message)s')
63

74
response = requests.get(
85
"https://api.github.com/search/repositories?q=language:python+stars:%3E1&sort=stars&order=desc")
96
response.raise_for_status()
107

118
data = response.json()["items"]
129

13-
logging.info("GitHub Repositories with Python language:")
14-
15-
for repo in data:
16-
owner_url = repo["owner"]["html_url"]
17-
logging.info(f"Open-source Projects repository URL: {owner_url}")
18-
logging.info("Logging completed.")
10+
with open("open-source.txt", "w", encoding="utf-8") as file:
11+
file.write("Open source GitHub Repositories with Python language:\n\n")
12+
for repo in data:
13+
owner_url = repo["owner"]["html_url"]
14+
description = repo["description"]
15+
name = repo["name"]
16+
file.write(f" \n Name: {name}\n Description: {
17+
description}\n Owner url: {owner_url} \n\n")
18+
file.write(
19+
"-------------------------------------------------------------------------------------------------------------------\n\n")

open-source.txt

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +0,0 @@
1-
2024-12-25 21:18:34,790 - GitHub Repositories with Python language:
2-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/public-apis
3-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/donnemartin
4-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/vinta
5-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/Significant-Gravitas
6-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/jackfrued
7-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/AUTOMATIC1111
8-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/ytdl-org
9-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/521xueweihan
10-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/yt-dlp
11-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/nvbn
12-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/pytorch
13-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/django
14-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/fastapi
15-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/tensorflow
16-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/home-assistant
17-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/openai
18-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/3b1b
19-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/fighting41love
20-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/pallets
21-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/bregman-arie
22-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/binary-husky
23-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/josephmisiti
24-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/abi
25-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/d2l-ai
26-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/python
27-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/ansible
28-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/xtekky
29-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/keras-team
30-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/swisskyrepo
31-
2024-12-25 21:18:34,790 - Open-source Projects repository URL: https://github.com/sherlock-project
32-
2024-12-25 21:18:34,791 - Logging completed.

0 commit comments

Comments
 (0)