Update rarbg.js
Browse files
rarbg.js
CHANGED
|
@@ -4,7 +4,10 @@ import * as cheerio from 'cheerio';
|
|
| 4 |
|
| 5 |
// Function to fetch RSS feeds and search torrents on RARBG
|
| 6 |
async function fetchRSSFeeds(searchQuery) {
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
console.log('\n🔄 Fetching RARBG search results for:', searchQuery);
|
| 10 |
|
|
|
|
| 4 |
|
| 5 |
// Function to fetch RSS feeds and search torrents on RARBG
|
| 6 |
async function fetchRSSFeeds(searchQuery) {
|
| 7 |
+
// Format the search query for series (e.g., yellowjackets-s03e01)
|
| 8 |
+
const formattedQuery = searchQuery.replace(/-s(\d{2})e(\d{2})/i, '-s$1e$2-'); // Ensuring correct format for series
|
| 9 |
+
|
| 10 |
+
const searchUrl = `https://en.rarbg.gg/search/?search=${encodeURIComponent(formattedQuery)}&category[]=movies&category[]=tv`;
|
| 11 |
|
| 12 |
console.log('\n🔄 Fetching RARBG search results for:', searchQuery);
|
| 13 |
|