https://www.17buddies.rocks/index.html

17's Buddies Maps HL1 Maps HL2 Wads Plan des Maps
17 Buddies
Only for stats

Welcome Guest ( Log In | Register )

I Can't Download Any Maps, because of MySQL database error
蛊真人
post 12/06/2024 - 02:40:12 |   Post #1
+Reply

Group: Member
Posts: 1
Joined: 25/04/2024

cn 


Error!

An error occurred during the operation:

Internal error in the MySQL database.

Please check your data. In doubt, thank you for reporting this error to the forum.

helpme cannot download map and SEE this . how to fix it thank you
Post PM
Website
Go to the top of the page
 
New
Replies
ImPuLsS
post 26/10/2024 - 12:48:17 |   Post #2
+Reply

Group: Member
Posts: 2
Joined: 15/06/2024

ro 


Hi, I'm Alex

I created this script to make map downloads from 17Buddies fast and easy. Inspired by the auto-download script originally posted by Safety1st, I wanted to expand on it with added features for a quicker experience.

**17Buddies Quick Downloader**

Description:
The 17Buddies Quick Downloader script allows you to instantly download maps from the 17Buddies website. It works for both individual map pages and the map list, making downloading maps a simple and fast process. Once installed, each map link is transformed into a direct download button, allowing you to get the maps without manually navigating through download pages.

How the Script Works:
1. **Identify Map Information**: The script fetches the map ID and name from each page or list.
2. **Prepare Download**: For each map, it forms the correct download link.
3. **Initiate Download**: It fetches the map file and prompts an automatic download.
4. **Retry Mechanism**: If the download link fails, it retries until successful.
5. **Applies to Buttons and Links**: The script detects and updates download buttons on individual pages and map lists, enabling direct downloads.

Installation Steps:
1. Make sure you have Tampermonkey installed in your browser.
2. View the script on GitHub here: 17Buddies Quick Downloader on GitHub.
3. For direct installation, use this link (Tampermonkey must be installed): Install 17Buddies Quick Downloader.
4. Click "Install" on the Tampermonkey page that opens, and the script will be added to your Tampermonkey scripts.

YouTube Video: here

Script Code:
Spoiler:

CODE

// ==UserScript==
// @name 17Buddies Quick Downloader
// @namespace http://tampermonkey.net/
// @version 2.4
// @description Instant map download for 17Buddies, applies to individual maps and map list
// @author @LeX
// @match https://www.17buddies.rocks/*
// @grant none
// @run-at document-start
// ==/UserScript==

(function() {
'use strict';

// Function to initiate the download process for a specific map using its ID and name
function startDownloadFromUrl(nId, zipName) {
const GlblUrl = "https://www.17buddies.rocks/17b2/";
const sTyp = "Map";
const bHlbox = 1;
const sCph = "x";
const szUrl = `${GlblUrl}Push/PreDown/${sTyp}/${nId}/${sCph}/${bHlbox}/index.html`;

async function startDownload() {
const loadingDiv = document.getElementById('Loading');
if (loadingDiv) loadingDiv.style.display = 'block';
try {
let response = await fetch(szUrl);
if (!response.ok) return;

let sResult = await response.text();
let FileDatas = sResult.split('|');
let FileName = FileDatas[2];

while (true) {
if (await requestZipData(FileName)) return;
}
} finally {
if (loadingDiv) loadingDiv.style.display = 'none';
}
}

// Requests and validates the zip file; retries if initial request fails
async function requestZipData(FileName) {
try {
let response = await fetch(`${GlblUrl}Get/${FileName}.zip`);
if (!response.ok) return false;

let arrayBuffer = await response.arrayBuffer();
let blob = new Blob([arrayBuffer], { type: response.headers.get('content-type') || 'application/octet-stream' });
let text = await new Response(blob).text();

if (!text.includes(FileName)) {
saveZipFile(new Blob([arrayBuffer], { type: 'application/zip' }), `${zipName.toLowerCase()}.zip`);
}

return !text.includes(FileName);
} catch {
return false;
}
}

// Saves the downloaded file to the user's device
function saveZipFile(blob, fileName) {
let link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.download = fileName;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}

startDownload();
}

// Overrides default download button behavior on individual map pages
function overrideDownloadButton(button) {
const nId = window.location.href.match(/\/Map\/(\d+)\//)[1];
const zipName = window.location.href.match(/\/([^\/]+)\.html$/)[1];
button.removeAttribute('onclick');
button.addEventListener('click', function(event) {
event.preventDefault();
startDownloadFromUrl(nId, zipName);
});
}

// Overrides download links in the map list to initiate quick download
function overrideListDownloadLink(link, nId, zipName) {
link.removeAttribute('onclick');
link.addEventListener('click', function(event) {
event.preventDefault();
startDownloadFromUrl(nId, zipName);
});
}

// Observes DOM changes for individual map page buttons and applies override
new MutationObserver((mutations, observer) => {
for (const mutation of mutations) {
for (const node of mutation.addedNodes) {
if (node.nodeType === 1 && node.matches('.MapBtn.MapDown')) {
overrideDownloadButton(node);
observer.disconnect();
}
}
}
}).observe(document, { childList: true, subtree: true });

// Observes DOM changes for download links in map lists and applies override
new MutationObserver((mutations) => {
for (const mutation of mutations) {
for (const node of mutation.addedNodes) {
if (node.nodeType === 1 && node.matches('.MapActions a[onclick^="GoDown"]')) {
const parentDiv = node.closest('div[id^="usrl_"]');
if (parentDiv) {
const nId = parentDiv.id.split('_')[1];
const zipName = parentDiv.querySelector('.ObjectName span[itemprop="itemListElement"]').textContent;
overrideListDownloadLink(node, nId, zipName.toLowerCase());
}
}
}
}
}).observe(document, { childList: true, subtree: true });
})();



This post has been edited by ImPuLsS: 26/10/2024 - 12:49:23
Post PM
Website
Go to the top of the page

Posts in this topic
- 蛊真人   I Can't Download Any Maps   12/06/2024 - 02:40:12
- - Sloggy   i have the same problem   13/06/2024 - 16:32:22
- - 2141700552   所以要怎么解决?   19/06/2024 - 14:38:07
- - DedSec   same problem x(   19/06/2024 - 16:04:29
- - tamoqohuhe   Same. Made an account just because I could no lon...   21/06/2024 - 17:44:58
- - tamoqohuhe   It actually worked on the 19th for a bit and I qui...   21/06/2024 - 18:18:38
- - EnborianPL   I also can't download ANYTHING.   25/06/2024 - 16:02:21
- - buckets   been broken for months now   04/07/2024 - 04:57:29
- - Izuko_Fukuda   So what's going on?did the opreators of the si...   12/07/2024 - 12:49:14
- - mihailm   ЦитатаОшибка! Произошла ...   15/07/2024 - 07:43:39
- - cs3248   ITS SHOW ME MYSQL ERROR, wth any fix??   15/07/2024 - 23:20:08
- - finez   Yep, same here, can't download any map , no ma...   27/07/2024 - 09:09:27
|- - cs3248   引用 (finez @ 27/07/2024 - 16:09...   08/08/2024 - 10:11:15
- - El Abuelo   Hello guys, I can't download maps either, with...   16/08/2024 - 06:21:40
- - Dr. Y. J. Shazbot   I really hope this gets addressed. This would be a...   28/08/2024 - 05:51:25
- - Dr. Y. J. Shazbot   A temporary fix is available. Go to any map you wi...   11/09/2024 - 08:06:27
- - byplt   I updated the script; Spoiler: CODE// Cr...   11/09/2024 - 15:56:54
|- - DarkGenius   QUOTE (byplt @ 11/09/2024 - 12:26...   18/09/2024 - 03:58:01
|- - Artir   QUOTE (byplt @ 11/09/2024 - 16:56...   19/09/2024 - 00:44:59
- - Safety1st   Created complete guide about both download workaro...   29/09/2024 - 01:06:16
|- - sxie   QUOTE (Safety1st @ 29/09/2024 - 02:0...   04/10/2024 - 16:26:39
|- - Th3-822   CITA(sxie @ 04/10/2024 - 11:26:3...   09/10/2024 - 00:26:47
- - Safety1st   I don't know a way, sorry. Try to ask byplt or...   04/10/2024 - 16:31:12
- - siriusryu   How to download models? not only maps   13/10/2024 - 09:19:11
- - death2024   None of these scripts work   13/10/2024 - 21:08:24
- - Safety1st   Script is fine. Without detailed info there is no ...   13/10/2024 - 21:13:49
|- - caizi   引用 (Safety1st @ 14/10/2024 - 04...   16/10/2024 - 04:31:04
- - Safety1st   caizi, thank you very much!   16/10/2024 - 05:42:35
- - Safety1st   Trying to reach the owner…   16/10/2024 - 06:45:00
- - death2024   So if chrome works and what script to use   22/10/2024 - 14:37:30
- - Safety1st   Just reread carefully and try to understand, you...   22/10/2024 - 15:18:24
- - ImPuLsS   Hi, I'm Alex I created this script to make ma...   26/10/2024 - 12:48:17
- - Safety1st   Trying to reach the server operator…   06/11/2024 - 04:28:58
- - Arkshine   Sorry for the delay. It should be fixed. I used ...   10/11/2024 - 01:31:51
- - Safety1st   Hallelujah!   10/11/2024 - 02:30:15

18 User(s) are reading this topic (18 Guests and 0 Anonymous Users)
0 Members:

New
 


RSS Lo-Fi Version
 
Skin © Chapo