hankchin commited on
Commit
ec737c0
·
verified ·
1 Parent(s): b1398e1

Update rarbg.js

Browse files
Files changed (1) hide show
  1. rarbg.js +4 -1
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
- const searchUrl = `https://en.rarbg.gg/search/?search=${encodeURIComponent(searchQuery)}&category[]=movies&category[]=tv`;
 
 
 
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