Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9212021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:25:49+00:00 2026-06-18T01:25:49+00:00

Situation: I want to run some app on my vps ubuntu server for crawl

  • 0

Situation:

I want to run some app on my vps ubuntu server for crawl testing purposes.
My app uses meteor-router from ‘atmosphere’ with mrt package manager.
On my local mac os x 10.8 with phantomjs, installed with brew, everything goes fine. I get nice snapshot of my page by adding

http://sample.com/?_escaped_fragment_=

to url.

Problem:

Lets try the same on my ubuntu vps server. 2 ways:

1) copy not bundled app to server and run it with mrt run command: It works unstable. Sometimes it renders ok. But sometimes my dynamic content is blank. Like my db is empty.

2) copy not bundled app to server and mrt bundle fname.tgz it, then unpack .tgz and run its main.js with node. This way spiderable works absolutely wrong. i get blank instead of dynamic data every time i try.

My ideas:

My ubuntu machine has a lot less memory and processor resources than my local machine. That is why it takes more time to generate dynamic content, but phantom thinks that page is over and makes snapshot before meteor render.

Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:25:50+00:00Added an answer on June 18, 2026 at 1:25 am

    I think I solved this issue.
    It is really a problem in spiderable.js file.
    this module runs phantomjs in REPL state and gives him such code by stdin:

    var url = '" + url + "';
    var page = require('webpage').create();
    page.open(url);
    
    setInterval(function() {
      var ready = page.evaluate(function () {
        if (typeof Meteor !== 'undefined'
            && typeof(Meteor.status) !== 'undefined'
            && Meteor.status().connected) {
          Meteor.flush();
          return Meteor._LivedataConnection._allSubscriptionsReady();
        }
        return false;
      });
    
      if (ready) {
        var out = page.content;
        out = out.replace(/<script[^>]+>(.|\\n|\\r)*?<\\/script\\s*>/ig, '');
        out = out.replace('<meta name=\"fragment\" content=\"!\">', '');
    
        console.log(out);
        phantom.exit();
      }
    }, 100);
    

    The problem is when all Meteor conditions are passed, it thinks that page.content is 100% updated. But it is not. The solution i found and tested is to wrap if block in setTimeout (500ms worked for me just fine):

      if (ready) {
        setTimeout(function () {
          var out = page.content;
          out = out.replace(/<script[^>]+>(.|\\n|\\r)*?<\\/script\\s*>/ig, '');
          out = out.replace('<meta name=\"fragment\" content=\"!\">', '');
    
          console.log(out);
          phantom.exit();
        }, 500);
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I often run into the situation where I want to disable some code while
I have run into a situation where I want to ensure that a compound
Situation: I want to provide a website service where users can enter some data
So the situation is: I want to optimize my code some for doing counting
I have a situation where i want to return List<> from this function public
I'm unit testing some extensions of Zend_Controller_Action in SimpleTest. I want to be able
This is the situation, I have configured a dial up server and i want
Here's the current situation I'm in: I want to distribute a binary app on
I have a file system app that uses a SQL Server 2008 R2 to
There is a situation where I want to invoke a method after some predetermined

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.