<commit_before>package grunk

import (
	// curl "github.com/andelf/go-curl"
	"compress/gzip"
	"encoding/json"
	"io"
	// "io/ioutil"
	"log"
	"net/http"
	"os"
	"strings"
	"time"
)

const SOUNDCLOUD_ID = "27b079ec70d5787cee129f9b31ba5f4f"

func constructCookie(name string, value string) *http.Cookie {
	cookie := new(http.Cookie)
	cookie.Name = name
	cookie.Value = value
	cookie.Path = "/"
	cookie.HttpOnly = false
	cookie.Secure = false
	return cookie
}

func getRoomMedia(room string, AUTH_COOKIE string) map[string]string {
	url := "http://plug.dj/_/gateway/room.details"
	request := `{"service":"room.details","body":["` + room + `"]}`

	client := &http.Client{}

	wrapped_json := strings.NewReader(request)
	// client := http.Client{Jar: jar}
	req, err := http.NewRequest("POST", url, wrapped_json)
	if err != nil {
		log.Println("NewRequest Error")
		log.Fatal(err)
	}
	req.Header.Set("Cookie", AUTH_COOKIE)
	req.Header.Set("Origin", `http://plug.dj`)
	req.Header.Set("Accept-Encoding", `gzip,deflate,sdch`)<commit_msg>Removed time<commit_after>package grunk

import (
	"compress/gzip"
	"encoding/json"
	"io"
	"log"
	"net/http"
	"os"
	"strings"
)

const SOUNDCLOUD_ID = "27b079ec70d5787cee129f9b31ba5f4f"

func constructCookie(name string, value string) *http.Cookie {
	cookie := new(http.Cookie)
	cookie.Name = name
	cookie.Value = value
	cookie.Path = "/"
	cookie.HttpOnly = false
	cookie.Secure = false
	return cookie
}

func getRoomMedia(room string, AUTH_COOKIE string) map[string]string {
	url := "http://plug.dj/_/gateway/room.details"
	request := `{"service":"room.details","body":["` + room + `"]}`

	client := &http.Client{}

	wrapped_json := strings.NewReader(request)
	// client := http.Client{Jar: jar}
	req, err := http.NewRequest("POST", url, wrapped_json)
	if err != nil {
		log.Println("NewRequest Error")
		log.Fatal(err)
	}
	req.Header.Set("Cookie", AUTH_COOKIE)
	req.Header.Set("Origin", `http://plug.dj`)
	req.Header.Set("Accept-Encoding", `gzip,deflate,sdch`)
{'fraction_non_alphanumeric': 0.17371601208459214, 'fraction_numerical': 0.019133937562940583, 'mean_word_length': 4.709770114942529, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3653984', 'n_tokens_mistral': 803, 'n_tokens_neox': 769, 'n_words': 138}