galamai / aspnetcore.rendertron Goto Github PK
View Code? Open in Web Editor NEWASP.net core middleware for GoogleChrome Rendertron https://github.com/GoogleChrome/rendertron.
License: MIT License
ASP.net core middleware for GoogleChrome Rendertron https://github.com/GoogleChrome/rendertron.
License: MIT License
Is this project completely dead?
There are crucial bugfixes unmerged for a long time.
If it's dead, I would like to fork.
I would like to merge in pull requests, implement mobile mode (maybe ability to send mobile bots to mobile rendered site and desktop bots to desktop render)...
Hi team,
I have cloned this git repo into my local machine and tried to run it on my Windows 10 box as below
$ docker-compose -f docker-compose.yml -f docker-compose.override.yml build
It built successfully with no error. Then the next step, I put another command to run it as the following
$ docker-compose -f docker-compose.yml -f docker-compose.override.yml up rendertron
In this stage, I have got the exception Unexpected token
. The full stack trace information as below
# docker-compose -f docker-compose.yml -f docker-compose.override.yml up rendertron
Docker Compose is now in the Docker CLI, try `docker compose up`
Starting aspnetcorerendertron_rendertron_1 ... done
Attaching to aspnetcorerendertron_rendertron_1
rendertron_1 |
rendertron_1 | > [email protected] start /app
rendertron_1 | > node build/rendertron.js
rendertron_1 |
rendertron_1 | /app/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:707
rendertron_1 | catch {
rendertron_1 | ^
rendertron_1 |
rendertron_1 | SyntaxError: Unexpected token {
rendertron_1 | at createScript (vm.js:80:10)
rendertron_1 | at Object.runInThisContext (vm.js:139:10)
rendertron_1 | at Module._compile (module.js:617:28)
rendertron_1 | at Object.Module._extensions..js (module.js:664:10)
rendertron_1 | at Module.load (module.js:566:32)
rendertron_1 | at tryModuleLoad (module.js:506:12)
rendertron_1 | at Function.Module._load (module.js:498:3)
rendertron_1 | at Module.require (module.js:597:17)
rendertron_1 | at require (internal/module.js:11:18)
rendertron_1 | at Object.<anonymous> (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/Target.js:19:19)
rendertron_1 | npm ERR! code ELIFECYCLE
rendertron_1 | npm ERR! errno 1
rendertron_1 | npm ERR! [email protected] start: `node build/rendertron.js`
rendertron_1 | npm ERR! Exit status 1
rendertron_1 | npm ERR!
rendertron_1 | npm ERR! Failed at the [email protected] start script.
rendertron_1 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
rendertron_1 |
rendertron_1 | npm ERR! A complete log of this run can be found in:
rendertron_1 | npm ERR! /root/.npm/_logs/2021-04-28T04_17_36_835Z-debug.log
aspnetcorerendertron_rendertron_1 exited with code 1
Any guys can shred the light on how to fix this issue?
I have seen the repo is quite old, the last commit was almost 3 years ago. Do we have to maintain it or we have any other forks to maintain this cool project?
hi
thank u for this awesome library
any help for using it in "asp core + angular" spa application in production?
Since rendertron support cache now, I wonder if we can have a feature like sending normal request to rendertron but don't return the response. So the request will make rendertron to create a cache file.
Generally people share a page on Facebook, they visit the site first. So this feature will make rendertron generate a cache before Facebook's crawler hit the page.
If we can have an option to control this action that will be awesome!
Hi - first of all - thank you very much for creating this awesome Middleware for the .net framework!
I am using this middleware within a docker environment having several containers (one running the ASP .Net Core application and another running the rendertrone service) running a common virtual network. I have configured your middleware like so: app.UseRendertron(proxyUrl: "http://rendertron:3000/render/");
This results in your middleware sending the following request to the rendertrone service:
http://rendertron:3000/render/http://127.0.0.1:8080, which of course, the rendertrone service is unable to find resulting in this error message:
> [email protected] start /rendertron
> node build/rendertron.js
Listening on port 3000
Error: net::ERR_CONNECTION_REFUSED at http://127.0.0.1:8080/
at navigate (/rendertron/node_modules/puppeteer/lib/Page.js:598:37)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Rendertrone is trying to connect on itself on port 8080, which is completely wrong.
What I would need was something like this:
app.UseRendertron(proxyUrl: "http://rendertron:3000/render/http://airborne-aviation:8080");
In other words, I need a possibility to tell the middleware exactly how to call the rendertron service
Best regards and many thanks so far!
Samuel
use Uri.EscapeDataString instead of Uri.EscapeUriString.
url like "http://localhost:5000?code=100" will not rendered
The readme references a UseForEmptyUserAgents
option that is not defined in the current source code. (Nor in the historic source code from searching GitHub.
if base url like
<base href="https://www.test.com/">
it doesn't work correctly. There is an extra ">" in the result.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.