Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The problem I would like to solve is this. I browse to a website that contains ordered blocks of text one after another. I would like to run a script on this page that goes into the webpages source, extracts these blobs of text, and then outputs each blob into a file.

How do I do something like this? Can I do it from the vimperator shell?

(I can write the text extracting and output part, in python I'm thinking. The other parts are beyond me atm)

share|improve this question

closed as off topic by ChrisF, BinaryMisfit, Dave M, CharlieRB, Tanner Faulkner Jan 22 '13 at 15:57

Questions on Super User are expected to relate to computer software or computer hardware within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

It is possible to write files from Vimperator, as described here. Also, from what you're describing you don't really need Python, you could extract the text and write it from the same JavaScript file.

You can write files like this: (from the Vimperator command line)

:js var f = new io.File('~/extracted.txt'); f.write('extracted text');

To extract the text, you could use vanilla JavaScript, or you could probably source JQuery and use it's selectors. I haven't tried this, but it sounds like it's definitely doable.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.