diff --git a/Form1.cs b/Form1.cs index d6db4b1..ced4127 100644 --- a/Form1.cs +++ b/Form1.cs @@ -22,7 +22,7 @@ namespace Omnibus public partial class Form1 : Form { - private String version = "1.5.1"; + private String version = "1.5.3.1"; private String url = "https://getcomics.info/?s="; private int cancelled = 0; private bool isDownloading = false; @@ -33,6 +33,8 @@ public partial class Form1 : Form public int LVCount = 0; private int page = 1; + string userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"; + private object comicIndex; private IEnumerable nodes, descNodes, ulNodes, newpageNodes, oldpageNodes; @@ -188,7 +190,9 @@ private async void btnDownload_ClickAsync(object sender, EventArgs e) string[] a = node.Split('"'); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(a[1]); - request.UserAgent = Properties.Settings.Default.UserAgent; + //request.UserAgent = Properties.Settings.Default.UserAgent; + request.UserAgent = userAgent; + request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"; request.Headers.Add(HttpRequestHeader.Cookie, "__cfduid=" + Properties.Settings.Default.cfduid + ";" + "cf_clearance=" + Properties.Settings.Default.cf_clearance @@ -343,6 +347,14 @@ private async void btnDownload_ClickAsync(object sender, EventArgs e) } + else + { + + var statusCode = response.StatusCode; + var statusDesc = response.StatusDescription; + + MessageBox.Show("Error: " + statusCode + ": " + statusDesc); + } } } else @@ -750,7 +762,9 @@ private void cmsComics_ItemClicked(object sender, ToolStripItemClickedEventArgs string[] a = node.Split('"'); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(a[1]); - request.UserAgent = Properties.Settings.Default.UserAgent; + //request.UserAgent = Properties.Settings.Default.UserAgent; + request.UserAgent = userAgent; + request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"; request.Headers.Add(HttpRequestHeader.Cookie, "__cfduid=" + Properties.Settings.Default.cfduid + ";" + "cf_clearance=" + Properties.Settings.Default.cf_clearance @@ -850,6 +864,14 @@ private void cmsComics_ItemClicked(object sender, ToolStripItemClickedEventArgs else MessageBox.Show("No download link available. Go to comic's page and download manually."); } + else + { + + var statusCode = response.StatusCode; + var statusDesc = response.StatusDescription; + + MessageBox.Show("Error: " + statusCode + ": " + statusDesc); + } } if (e.ClickedItem.Name == "validateMF") { @@ -858,7 +880,9 @@ private void cmsComics_ItemClicked(object sender, ToolStripItemClickedEventArgs string[] a = node.Split('"'); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(a[1]); - request.UserAgent = Properties.Settings.Default.UserAgent; + //request.UserAgent = Properties.Settings.Default.UserAgent; + request.UserAgent = userAgent; + request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"; request.Headers.Add(HttpRequestHeader.Cookie, "__cfduid=" + Properties.Settings.Default.cfduid + ";" + "cf_clearance=" + Properties.Settings.Default.cf_clearance @@ -958,6 +982,14 @@ private void cmsComics_ItemClicked(object sender, ToolStripItemClickedEventArgs else MessageBox.Show("No download link available. Go to comic's page and download manually."); } + else + { + + var statusCode = response.StatusCode; + var statusDesc = response.StatusDescription; + + MessageBox.Show("Error: " + statusCode + ": " + statusDesc); + } } } @@ -1120,8 +1152,14 @@ private void searchComics(string function) reqCookies.Add(cookieCfClearance); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(searchURL); - request.UserAgent = Properties.Settings.Default.UserAgent; + //request.UserAgent = Properties.Settings.Default.UserAgent; + request.UserAgent = userAgent; request.CookieContainer = reqCookies; + request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"; + request.Headers.Add(HttpRequestHeader.Cookie, + "__cfduid=" + Properties.Settings.Default.cfduid + ";" + + "cf_clearance=" + Properties.Settings.Default.cf_clearance + ); //request.Headers.Add(HttpRequestHeader.Cookie, // "__cfduid=" + Properties.Settings.Default.cfduid + ";" + diff --git a/bin/Debug/Catians #1 (2023).cbr b/bin/Debug/Catians #1 (2023).cbr new file mode 100644 index 0000000..bec00d3 Binary files /dev/null and b/bin/Debug/Catians #1 (2023).cbr differ diff --git a/bin/Debug/Omnibus.exe b/bin/Debug/Omnibus.exe index f41cc50..b53ff95 100644 Binary files a/bin/Debug/Omnibus.exe and b/bin/Debug/Omnibus.exe differ diff --git a/bin/Debug/Omnibus.pdb b/bin/Debug/Omnibus.pdb index 71827f6..f234b76 100644 Binary files a/bin/Debug/Omnibus.pdb and b/bin/Debug/Omnibus.pdb differ diff --git a/bin/Debug/Petrol Head #5 (2024).cbr b/bin/Debug/Petrol Head #5 (2024).cbr new file mode 100644 index 0000000..50eb9c5 Binary files /dev/null and b/bin/Debug/Petrol Head #5 (2024).cbr differ diff --git a/bin/Debug/The One Hand #2 (2024).cbr b/bin/Debug/The One Hand #2 (2024).cbr new file mode 100644 index 0000000..36feb8f Binary files /dev/null and b/bin/Debug/The One Hand #2 (2024).cbr differ diff --git a/obj/Debug/Omnibus.exe b/obj/Debug/Omnibus.exe index f41cc50..b53ff95 100644 Binary files a/obj/Debug/Omnibus.exe and b/obj/Debug/Omnibus.exe differ diff --git a/obj/Debug/Omnibus.pdb b/obj/Debug/Omnibus.pdb index 71827f6..f234b76 100644 Binary files a/obj/Debug/Omnibus.pdb and b/obj/Debug/Omnibus.pdb differ diff --git a/obj/Release/DesignTimeResolveAssemblyReferences.cache b/obj/Release/DesignTimeResolveAssemblyReferences.cache index 1298f8c..bbdb6fc 100644 Binary files a/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/obj/Release/DesignTimeResolveAssemblyReferences.cache differ diff --git a/obj/Release/Omnibus.exe b/obj/Release/Omnibus.exe index 24982bf..3e06ac4 100644 Binary files a/obj/Release/Omnibus.exe and b/obj/Release/Omnibus.exe differ diff --git a/obj/Release/Omnibus.pdb b/obj/Release/Omnibus.pdb index 5a8a4d9..2a44f00 100644 Binary files a/obj/Release/Omnibus.pdb and b/obj/Release/Omnibus.pdb differ