Skip to content

Commit

Permalink
Update scraper to reflect it's rebranding
Browse files Browse the repository at this point in the history
  • Loading branch information
YoungerDryas89 committed Nov 21, 2024
1 parent 4784cd7 commit c718b2f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private void initializeJAVCensoredGroupDefaultPreferences() {

//JAV Preferences

DataItemSourceAmalgamationPreference overallOrdering = new DataItemSourceAmalgamationPreference(new NJavParsingProfile(), new JavLibraryParsingProfile(), new AvMooParsingProfile(),
DataItemSourceAmalgamationPreference overallOrdering = new DataItemSourceAmalgamationPreference(new AV123ParsingProfile(), new JavLibraryParsingProfile(), new AvMooParsingProfile(),
new SquarePlusParsingProfile(), new JavBusParsingProfile(), new ActionJavParsingProfile(), new DmmParsingProfile());

ScraperGroupAmalgamationPreference preferences = new ScraperGroupAmalgamationPreference(ScraperGroupName.JAV_CENSORED_SCRAPER_GROUP, overallOrdering);
Expand All @@ -146,7 +146,7 @@ private void initializeJAVCensoredGroupDefaultPreferences() {

// R18 has the absolute best title information. Pick any english
// site first, fallback to machine translated DMM
DataItemSourceAmalgamationPreference bestContentForID = new DataItemSourceAmalgamationPreference(new NJavParsingProfile(), new JavLibraryParsingProfile(),
DataItemSourceAmalgamationPreference bestContentForID = new DataItemSourceAmalgamationPreference(new AV123ParsingProfile(), new JavLibraryParsingProfile(),
new ActionJavParsingProfile(), new SquarePlusParsingProfile(), new AvMooParsingProfile(), new JavBusParsingProfile());
preferences.setCustomOrderingForField("id", bestContentForID);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@
import moviescraper.doctord.model.dataitem.*;
import moviescraper.doctord.model.dataitem.Runtime;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

import javax.annotation.Nonnull;
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class NJavParsingProfile extends SiteParsingProfile implements SpecificProfile {
public class AV123ParsingProfile extends SiteParsingProfile implements SpecificProfile {

final String titlePath = "html body div#app div#body div#page-video.container div.row div.col div.d-flex.justify-content-between.align-items-start div.mr-3 h1";
final String posterPath = "html body div#app div#body div#page-video.container div.row div.col div#player";
Expand Down Expand Up @@ -245,7 +243,7 @@ public String createSearchString(File file) {

@Override
public String createSearchStringFromId(String id) {
return "https://njav.tv/en/v/" + id;
return "https://123av.com/en/v/" + id;
}

@Override
Expand All @@ -256,12 +254,12 @@ public SearchResult[] getSearchResults(String searchString) throws IOException {

@Override
public SiteParsingProfile newInstance() {
return new NJavParsingProfile();
return new AV123ParsingProfile();
}

@Override
public String getParserName() {
return "NJav";
return "123AV";
}

@Nonnull
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package moviescraper.doctord.controller.siteparsingprofile;

import moviescraper.doctord.controller.siteparsingprofile.specific.NJavParsingProfile;
import moviescraper.doctord.controller.siteparsingprofile.specific.AV123ParsingProfile;
import org.junit.BeforeClass;
import org.junit.Test;

import java.io.IOException;

import static org.junit.Assert.assertEquals;

public class NJavParsingProfileTest {
static NJavParsingProfile parser;
public class AV123ParsingProfileTest {
static AV123ParsingProfile parser;


@BeforeClass
public static void initialize() throws IOException {
parser = new NJavParsingProfile();
parser = new AV123ParsingProfile();
var result = parser.getSearchResults("siro-5283");
var response = SiteParsingProfile.getDocument(result[0]);
if(response.statusCode() == 200)
Expand Down

0 comments on commit c718b2f

Please sign in to comment.