N
N
Nayanamarky2014-01-15 10:47:50
Search Engine Optimization
Nayanamarky, 2014-01-15 10:47:50

What can be used to write a simple program for parsing a page, copying a certain piece of text from a site and pasting it into a file?

Task: There is a page tourdom.tv/happy-hour/schastlivyj-chas , updated every day. On which the items repeated every day: Price, Date, number of days, Country, city, etc. We need to make an algorithm (probably write a program) that will parse the specified page and find a specific value (for example, "the next two words after the word" tour package: ", or the number before the word" days "), copy this value and paste it into the specified place (text Example
: on the first page, a tour package about Greece should look like this in text form:
Greece, Zakynthos Island
Check-in on 05/04/2014
8 days
25,500 rubles per person
(~ 567 €)
Flight: a/k Astra Airlines
Hotel :
Room: DBL, standard
Meals: half board (HB)

Then I export everything manually, for now, to photoshop (but this is a secondary task for now)
In what language can this be easily implemented? Given that no one has studied, but there is time, it seems that the program does not seem so complicated. Now it's all done manually and takes a certain amount of time. I am a technically minded person and I believe that this can be optimized.
I suppose that the program should parse the html code (perhaps, or as an option, just copy\paste the entire page in any text editor), find certain words and copy the word\symbols\sentence according to the algorithm, be able to handle some exceptions and paste into a pre-prepared template, or generate a given template yourself. Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Lerg, 2014-01-15
@Nayanamarky

Python. There are ready-made examples of site parsing, I think you can figure it out.

N
Nikolai Turnaviotov, 2014-01-18
@foxmuldercp

under Windows it is still possible to turn scripts.
well, or c# the same to start mastering, for example.
although pearl and python are cross-platform, and will be useful in principle, and programmers for them are valued

N
Nayanamarky, 2014-01-17
@Nayanamarky

Thanks everyone for the replies. Started learning Phyton by Lutz(4). AutoIt also turned out to be a very interesting solution, although it is not ideal for my purposes, but it allows you to automate many processes very much.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question