feat: add support for gitea session tokens

This commit is contained in:
2026-10-04 16:17:00 +02:00
parent 797a87a705
commit 21eaf4d81f
+6
View File
@@ -4,6 +4,12 @@ import Foundation
let gitea = URL(string: "https://git.kpgpmc.org/explore/repos")! let gitea = URL(string: "https://git.kpgpmc.org/explore/repos")!
var request = URLRequest(url: gitea) var request = URLRequest(url: gitea)
request.httpMethod = "GET" request.httpMethod = "GET"
if CommandLine.arguments.count > 1,
let cookiestring = String?(CommandLine.arguments[1]) {
request.setValue("i_like_gitea=\(cookiestring)", forHTTPHeaderField: "Cookie")
}
let semaphore = DispatchSemaphore(value: 0) let semaphore = DispatchSemaphore(value: 0)
let search_string = "tw-text-primary name" let search_string = "tw-text-primary name"
let hrefRegex = #/href="([^"]+)"/# let hrefRegex = #/href="([^"]+)"/#