-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How about Stackexchange? #17
Comments
Totally possible since they use the same layouts, but the issue is distinguishing between stack exchange and stack overflow threads. Both platforms use the same URL path format, so it's a question of the best way to either guess which platform the user wants or give them a choice, which may come off as annoying to some. |
You're right. Guessing the platform would probably be hard if not impossible. To make it even worse, they have subdomains on Stackexchange. |
Would it possible to add some sort of configuration option if a hosted instance is for Stackexchange or Stackoverflow? So you would have instances handling Stackoverflow and others Stackexchange. To overcome the issue with subdomains of Stackexchange, you could move them into the path string. So for example a |
That's a great idea. I'll implement it soon. |
After thinking about it a little, I actually think just creating a |
Version 1.8 has been released with StackExchange support and is deployed on the Whatever Social instance. Let me know if this fits your needs. |
Thanks allot for your work! Somehow it does not seem work yet. I see a 404 on the link you've added and i am not able to add any Stackexchange URL into the input bar on the landing site. |
Can you send a screenshot of the 404 message? It's working on both my end and others'. |
There isn't much to see. It's a blank white page showing only The frontpage loads fine. But when entering to the input field, it will show: Both happens on your https://code.whatever.social site. |
Not sure if you did something but it works now. Both of it. |
Hi, we deployed it on a new node yesterday, and I forgot to update it on there just now. The reason why it was working for multiple people was that they were routed to the US server (proximity-based), which was on 1.8. Thanks for reporting this. |
Thanks allot! Great work! On a side note: you may mention Libredirect in your README file as they've implemented your tool already. It's probably easier for most people to use that in their browsers instead of custom redirect scripts as suggested currently. I'll head over there to inform them about this new feature and have them extend their browser extentions to automatically redirect Stackexchange as well. |
How about superuser.com? For example: seriously why is stack exchange structured like this?? |
Hey, looking at this again now I'm wondering, why not just implement a Seems to me like they all use the same format. (question, description, An example url rewrite could look like: So in practice: Or: I might be wrong here, but it seems like the /question/ sub-path is kinda |
Question IDs are NOT exclusive to each platform. This means that it's impossible for the server to take a correct guess as to which platform you intended, as discussed above. |
I don't understand. Assuming we wanted to generalize to support all sites then: It's not the servers job to guess the exchange. The server just receives a Then, using some scripts or something like libredirect we have the 'hook' Am I misunderstanding something? |
Oh I think I see what you mean. I missed the part about the site and meta path. I suppose this would work, but we'd have to compile a list of these types of sites. |
Could be something for me to look into when I get some free time then :) |
Sure. Backwards compatibility may be an issue, but it's totally solvable. |
You can easily get a list of all current sites by using xq from https://github.com/kislyuk/yq#xml-support and the xml file https://stackexchange.com/feeds/sites. This is just a proof of concept, later on you probably want to automatically generate this for example when starting AnonymousOverflow. curl https://stackexchange.com/feeds/sites | xq '[.feed.entry[] | {name: .title["#text"], url: .id}]' This will give you currently this json array: [
{
"name": "Solana Stack Exchange",
"url": "https://solana.stackexchange.com"
},
{
"name": "Bioacoustics Stack Exchange",
"url": "https://bioacoustics.stackexchange.com"
}
... etc, with 180 entries
]
I justed checked the urls and looked at your implementation.
The best would be to just fetch the urls on startup or at an interval and let it act like a whitelist, instead of hardcoding with |
You migh want to use URL parameters, similarly to
|
This issue has already been resolved as of release 1.8. Forgot to close the issue. |
@httpjamesm as mentioned in my previous comment some stackexchange urls (that are not *.stackexchange.com urls) will still get flagged as invalid |
Are there example URLs of several domains? |
Any update on this? The aforementioned superuser url: https://superuser.com/questions/769452/what-is-a-openpgp-gnupg-key-id is still being flagged as invalid. |
If you'd like to pick this up, you can create a PR. I may add this soon, but no guarantees |
On Sun, 02 Jul 2023 15:55:01 -0700 httpjamesm ***@***.***> wrote:
If you'd like to pick this up, you can create a PR. I may add this
soon, but no guarantees
How do you intend to implement it?
Are there example URLs of several domains?
Will it be like Wikiless? (e.g. ?lang=de ?lang=en)
i.e. anonymousoverflow.i2p/questions/769452/what-is-a-openpgp-gnupg-key-id?brand=superuser
|
I actually haven't thought of that. Using a query parameter could be a more viable solution than the restructuring of path parameters as mentioned above. I'll end up choosing that probably |
If you choose to use query parameter, please pick something special or
common, but not regarded as "ad-related", so that links won't break by
ClearURLs extensions.
From my personal experience, I think 'type' would be a good choice.
I have whitelisted 'type' in my program, and saw that it is mostly
related to filetype of web feeds, so I think it is a good choice.
https://openuserjs.org/scripts/sjehuda/Clean_URL_Improved
|
Is there a consensus for sites like ask ubuntu and superuser yet? |
I think the query parameter system can make special exceptions for cases like askubuntu. Otherwise, it can default to .stackexchange.com |
https://serverfault.com/ There's your list... Why not just allow the entire URL to be placed after the AO root: https://anonymous.overflow/https://serverfault.com/questions/... |
This would break implementations like Libredirect. The URL would also have to be verified regardless of the schema. |
Any update on this? I agree with the idea of e.g. Very annoying to have this artificial limitation on accessing sites like superuser when the actual scraping code here is obviously applicable. I want to help if I can. |
Completely changing the way stack overflow links are converted to anonymous overflow links would break every current implementation. I suggested the query parameter idea a while ago because it builds on the current implementation without major changes. If you'd like to contribute, feel free to open a PR to kick-start this. |
I've just put together #99 which implements the required functionality in a backwards-compatible way. |
Hi, |
Good point. I changed the code so that if the exchange parameter has a dot, it is treated as a full domain. So e.g. to access superuser.com you would do |
I've found AnonymousOverflow through Libredirect. But it seems it's limited to Stackoverflow only. Are there any plans to extend it to Stackexchange?
The text was updated successfully, but these errors were encountered: