Skip to content

Commit

Permalink
Merge pull request #1 from yenien/master
Browse files Browse the repository at this point in the history
Adapting to changes in Subdivx webpage
  • Loading branch information
lvitti authored Nov 30, 2020
2 parents 08b0d20 + ab45c22 commit 2bae8e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions SubdivX/SubdivXProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ private List<RemoteSubtitleInfo> SearchSubtitles(string query)

private List<RemoteSubtitleInfo> SearchSubtitles(string query, int page)
{
var html = GetHtml($"http://www.subdivx.com/index.php?accion=5&q={query}&pg={page}");
var html = GetHtml($"https://www.subdivx.com/index.php?accion=5&q={query}&pg={page}");
if (string.IsNullOrWhiteSpace(html))
return null;

string reListSub = "<a\\s+class=\"titulo_menu_izq\"\\s+href=\"http://www.subdivx.com/(?<id>[a-zA-Z\\w -]*).html\">(?<title>.*)</a></div>";
string reListSub = "<a\\s+class=\"titulo_menu_izq\"\\s+href=\"https://www.subdivx.com/(?<id>[a-zA-Z\\w -]*).html\">(?<title>.*)</a></div>";
reListSub += "+.*<img\\s+src=\"img/calif(?<calif>\\d)\\.gif\"\\s+class=\"detalle_calif\"\\s+name=\"detalle_calif\">+.*";
reListSub += "\\n<div\\s+id=\"buscador_detalle_sub\">(?<desc>.*?)</div>+.*<b>Downloads:</b>(?<download>.+?)<b>Cds:</b>+.*<b>Subido\\ por:</b>\\s*<a.+?>(?<uploader>.+?)</a>.+?</div></div>";
Regex re = new Regex(reListSub);
Expand Down Expand Up @@ -173,7 +173,7 @@ private List<RemoteSubtitleInfo> SearchSubtitles(string query, int page)

private SubtitleResponse DownloadSubtitle(string id)
{
var html = GetHtml($"http://www.subdivx.com/{id}.html");
var html = GetHtml($"https://www.subdivx.com/{id}.html");
if (string.IsNullOrWhiteSpace(html))
return null;

Expand All @@ -187,7 +187,7 @@ private SubtitleResponse DownloadSubtitle(string id)
var fileId = mat2.Groups["id"].Value;
var u = mat2.Groups["u"].Value;

var getSubtitleUrl = $"http://www.subdivx.com/bajar.php?id={fileId}&u={u}";
var getSubtitleUrl = $"https://www.subdivx.com/sub{u}/{fileId}";

var fileStream = GetFileStream(getSubtitleUrl);

Expand Down

0 comments on commit 2bae8e3

Please sign in to comment.