Support for IP-based access to bypass DNS blocking (CUII)
German ISPs are blocking s.to via DNS (CUII DNS-Sperre). Users can access the site via the direct IP address 186.2.175.5, but sdl currently fails with:
Cannot read properties of null (reading 'innerText')- the page isn't fully loaded when the title is queried- SSL certificate errors when following redirects
Root causes:
- The title element selector works, but the page isn't fully loaded when queried via
execute(). The site now requires waiting for dynamic content. - The IP-based URL isn't recognized by the URL regex pattern.
- Chrome blocks the self-signed certificate on the IP address.
- The reqwest HTTP client rejects the self-signed certificate when following redirects from
/redirect/endpoints.
Working fix (tested locally):
src/downloaders/aniworldserienstream.rs:
- Add IP address
186.2.175.5as a new Site variant - Extend URL regex to match IP-based URLs
- Replace
execute()with element query + wait for title extraction
src/chrome.rs:
- Add
--ignore-certificate-errorsflag to Chrome capabilities
src/download.rs:
- Add
danger_accept_invalid_certs(true)to the reqwest client
Happy to submit a PR if you're interested.
Hmm, why not simply change your DNS servers?
I did, but that wasn't the only issue. Its also https/http. I solved it for myself anyway. Would just be convinient for others. Its not a discussion, i just wanted to help.
Best
This is the only issue apparent to me:
Cannot read properties of null (reading 'innerText') - the page isn't fully loaded when the title is queried
Could you explain what you mean by https/http issue if you use s.to with custom DNS?
I just tried to download an episode and did not hit the title issue. Did this only happen on a specific site? When I open the source code of the page, the title is there, so it does not seem to be loaded with javascript in an asynchronous way.