refactor: centralize temporary file path generation and update file references
This commit is contained in:
@@ -12,7 +12,8 @@ func GetBLPicture(qqId string) (outputImgName string) {
|
||||
return ""
|
||||
}
|
||||
url := fmt.Sprintf("https://beatleader.xyz/u/%s", blId)
|
||||
outputImgPath := fmt.Sprintf("./tmp/beatleader_%s.png", blId)
|
||||
// outputImgPath := fmt.Sprintf("./tmp/beatleader_%s.png", blId)
|
||||
outputImgPath := util.GenTempFilePath(fmt.Sprintf("beatleader_%s.png", blId))
|
||||
outputImgName = fmt.Sprintf("beatleader_%s.png", blId)
|
||||
if err := util.ScreenshotURL(url, outputImgPath, 1420, 2280, 70, 50, 160, 140, "chartjs"); err != nil {
|
||||
fmt.Println(err)
|
||||
|
||||
Reference in New Issue
Block a user