Coder Social home page Coder Social logo

Comments (7)

BigBoyBarney avatar BigBoyBarney commented on May 17, 2024 1

I'll add on to this.
Some links (specifically youtube CHANNELS) cannot be added as source for some reason. I don't even get an error toast, just straight up nothing happens haha

Attempting to add https://www.youtube.com/@ccmusicc (or any other channel link) will results in nothing happening.
Youtube VIDEOS on the other hand can be added without an issue. Knowledge doesn't allow us to manually edit the link target, it's impossible to add links to channels

from knowledge.

RobRoyce avatar RobRoyce commented on May 17, 2024 1

Thank you all for the analysis. I am aware of this issue but haven't had time to deep dive.

One quick solution is to alert the user when an import fails and allow you to "Import Anyways". This will likely result in a Source without icons/thumbnails/metadata, etc., but at least the link will be imported.

Another solution is to load the page in a separate window/view (which will behave differently than just using a GET and then have a Confirm Import button).

I might implement the quick solution for next release and think on a more longterm solution for later.

from knowledge.

ByteSyze avatar ByteSyze commented on May 17, 2024

Knowledge is actually handling N-level domains without issue as long as the domain is reachable. This error message could be changed to something more precise, e.g. "Website unreachable". Even better, perhaps display the HTTP response code in a debug level notification.

from knowledge.

NxDs avatar NxDs commented on May 17, 2024

It is not tho, this is the original URL I tried https://play.google.com/ which is very clearly real and reachable, it does however fail regardless

image

from knowledge.

NxDs avatar NxDs commented on May 17, 2024

After some debugging it appears that yes, it does seem to handle N-level domains, the issue is actually something else, specifically a 403 response, perhaps when making the request it's not setting a proper agent? I can't see why else specifically google play website wouldn't be working, I did try a couple of other websites with 3 level domain and they do in fact work
Knowledge_SAIe6HDLar

from knowledge.

NxDs avatar NxDs commented on May 17, 2024

Replicating the same request using the same exact headers copied from network tab in DevTools seems to be working and 200 is returned with the page content in Java

HttpURLConnection uc = (HttpURLConnection) new URL("https://play.google.com/").openConnection();
uc.addRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Knowledge/0.7.0 Chrome/106.0.5249.165 Electron/21.2.1 Safari/537.36");
uc.addRequestProperty("cookie", "NID=511=IV2Uq0rfCoFIKKGF5DeICTV76wCw9daPy6U1p8UEzXFvZLPTR9Hu1P2IvnZ8MlZo5qB7T4UwkcXIY5dYNYK3C1CNPjXmAxBPQh5eBB1NiHwu2iwxMsOlx3Zw8BqI5Cqa0lg9SvNClryP8i6BZ4su70mof_r1qusby8wuJTaoqnY");
uc.addRequestProperty("accept-encoding", "gzip, deflate, br");
uc.addRequestProperty("accept-language", "en-US");
uc.addRequestProperty("sec-ch-ua", "\"Not;A=Brand\";v=\"99\", \"Chromium\";v=\"106\"");
uc.addRequestProperty("sec-ch-ua-mobile", "?0");
uc.addRequestProperty("sec-ch-ua-platform", "Windows");
uc.addRequestProperty("sec-fetch-dest", "empty");
uc.addRequestProperty("sec-fetch-mode", "cors");
uc.addRequestProperty("sec-fetch-site", "cross-site");
uc.connect();
System.out.println(uc.getResponseCode());

This ends my testing, I'm not knowledgeable enough regarding electron to properly pinpoint the issue

from knowledge.

RobRoyce avatar RobRoyce commented on May 17, 2024

I'll add on to this. Some links (specifically youtube CHANNELS) cannot be added as source for some reason. I don't even get an error toast, just straight up nothing happens haha

Attempting to add https://www.youtube.com/@ccmusicc (or any other channel link) will results in nothing happening. Youtube VIDEOS on the other hand can be added without an issue. Knowledge doesn't allow us to manually edit the link target, it's impossible to add links to channels

Interesting, this actually worked for me:

image

from knowledge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.