FYI, I am new with PowerShell so don’t know much.
readcomiconline.to
kissmanga.com
These websites supposedly are behind “Cloudfare”
From here
Because readcomiconline.to is behind CloudFlare, there’s a limit to visit the site. If you’re downloading a series with a lot of Issues or chapters, the script will halt mid-way, because cloudflare needs a ‘Human Check’
FYI, this github script(application?) has been written in python. I am making a version in POSH for kissmanga, and both of these websites are managed by the same owner/organization, so I assume they function more or less the same.
consider $url = “http://kissmanga.com/manga/fujimura-kun-meitsu“
Whenever I try to get the webpage content/source using,
DownloadString() Method
$web = New-Object Net.WebClient $source = $web.DownloadString($url)
Error:
Exception calling "DownloadString" with "1" argument(s): "The remote server returned an error: (503) Server Unavailable." At line:4 char:2 + $source = $web.DownloadString($url) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : WebException
or using Invoke-Webrequest
$page = Invoke-WebRequest -Uri "$url" -UseBasicParsing
Error:
$page = Invoke-WebRequest -Uri "$url" -UseBasicParsing Invoke-WebRequest : The remote server returned an error: (503) Server Unavailable. At line:1 char:9 + $page = Invoke-WebRequest -Uri "$url" -UseBasicParsing + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
I get a 503 server error in both cases.
But, when I visit the $url by using my browser, its gives me a
Wait for 5 seconds… and then loads
Is there anything I can do to access the webpage?
submitted by /u/DarthFarious
[link] [comments]
The post How to access a webpage behind Cloudfare with PowerShell? appeared first on How to Code .NET.