this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: Update SoFurry API integration to include headers and improve content URL extraction

+5 -4
+5 -4
scrapers/soFurryScraper.js
··· 24 24 "Content-Type": "application/json", 25 25 "Accept": "application/json" 26 26 }; 27 - const response = await axios.get(apiUrl); 27 + const response = await axios.get(apiUrl, { headers }); 28 28 29 29 if (!response.data) { 30 30 throw new Error('Failed to get data from SoFurry API'); 31 31 } 32 32 33 - // Get the content URL (full-sized image) 34 - const sourceImageUrl = response.data.displayUrl; 33 + // Get the content URL from the first content item 34 + const sourceImageUrl = response.data.content?.[0]?.body?.displayUrl; 35 35 if (!sourceImageUrl) { 36 36 throw new Error('No display URL found in SoFurry API response'); 37 37 } ··· 79 79 extractSubmissionId(url) { 80 80 // Extract submission ID from SoFurry URL format 81 81 // Format: https://sofurry.com/s/{SubmissionID} 82 - const idMatches = url.match(/\/s\/(\d+)/i); 82 + // Submission ID can be alphanumeric 83 + const idMatches = url.match(/sofurry\.com\/s\/([a-zA-Z0-9]+)/i); 83 84 84 85 // If we found a match, return the first capture group (the ID) 85 86 return idMatches ? idMatches[1] : null;