The room was quite deserted and I couldn’t see a person.

After all, this is a summer vacation, and the generals of the postgraduate exams generally do not use computers.

Going over to turn on the air conditioner, Lu Zhou casually found a machine to sit down, enter his student number and password, and skillfully log in to the computer.

The reason why I chose the school’s computer room is mainly because the programs written in the Python language are mainly run under the Linux System. The Python language can be said to be one move, two gains directly under the Linux environment.

And Lu Zhou’s own second-hand notebook is too junk, and thesis has to be suspended for a while in a pdf format. Hey, hey, others are starting to line up, he only stands on the spring, and the dual system or virtual machine is not used. want.

“Although the books are very clear, I didn’t expect this thing to be so troublesome to use… Sure enough, the things on paper are completely different from the actual operation. I still have to practice by trying to learn things.”

Lu Zhou, who first used the Linux System, only felt that her eyes were scratching. After watching the tutorial borrowed from the library for a while, I was able to figure out the doorway.

I have to say that other people’s windowssystem occupies such a large market share, it makes sense. The full-pattern operation system can easily get started even if it has not touched the computer’s white.

However, the Linux System is different. It is basically a command-line mode of operation, and everything can be done through the keyboard. Fortunately, the school installed a distribution with a desktop environment, or Lu Zhou really do not know the use of the mouse.

Of course, the advantages of Linux are also obvious. The superior customizability and security make it more suitable for servers and other fields than windowssystem. And once you are familiar with command-line operations, efficiency will be many times higher than windowssystem. Therefore, many companies will ask when they are recruiting programmers at the front and back of the server, whether they will use Linux System.

Familiar with the basic operation of the Linux System, Lu Zhou opened the python software, opened the book, and sat in front of the computer in a daze.

“Speaking of one of the uses of Python is to write web crawlers. If you want to test the results of your learning, it is best to start from this… But what is a crawler?”

Lu Zhou can’t help but fall into meditation.

Writing Weibo Blogs ?

Climb Teiba’s post?

It seems quite boring.

The key is that the data that climbed down was useless in your hand, and there was no place to put it.

Suddenly, his heart moved, somehow recalled the painful booking experience every time he went home. Not because of his computer card, but because the ui design of the official website of the Ministry of Railways is really anti-human.

“Crawling 12306website’s stations, trains, and ticket information with crawler technology… It seems like this can be done.”

At the thought of this, Lu Zhou is no longer tempered, and immediately begins to work.

After all, as a typical application example of the Python language, the template of the crawler program is mentioned in the book, and the algorithm has been improved to different degrees for different situations.

Of course, 12306 is not a general BBS forum after all. It is not difficult to use this as the practice goal of the initial Scholar.

But it’s just not too small. For the Land Study tyrant, which has already eaten through the whole book, the problem is not big. The crawler itself is not too technically difficult. The 30 line of code does not get the whole program, and it runs flawlessly.

Then it’s followed by grabbing.

Copy the url of the website behind the code, Lu Zhou chooses to run, and the data is generated into a table and imported into a pre-built folder.

Immediately after the fan of the chassis began to hum, the computer became stuck, and the line-by-line code flashed from the black dialog box and was quickly sorted into the form.

Looking at the folder that was constantly being filled, Lu Zhou felt in the heart of the chair.

“The python language is really fuck convenient, no wonder that many big cows recommend this stuff.”

Looking at the information that the line of data flashed, Lu Zhou really had the illusion of adding hackers.

But of course, it’s just an illusion, and I can’t even talk about it. After all, this stuff and the hacking technique are completely out of reach. It is not illegal to crawl public information from the server. At most, there is a suspicion of crowding out other server resources, which will be hated by the major webmasters.

Therefore, many “small” websites will be equipped with anti-crawling programs. The technical high point will either make you unable to climb anything, or climb down the garbled characters. The low-tech content can also be monitored by the number of accesses. Your ip.

However, 12306website is obviously not so stingy. Think about a monopoly giant that doesn’t even care about the user experience. Will you care about the server resources? As long as you don’t toss the server of Laozi to the streets, who will take care of you!

Looking at the ever-increasing number of trips in the folder, Lu Zhou turned his eyes and wondered if he would use it to do it.

“Be a booking ticket website? It seems like some pants off the fart…”

Suddenly, Lu Zhou felt a move.

or……

Be an online booking app?

When this tentative idea came out, it took root in his heart uncontrollably.

Although there are many third-party booking apps on the web, the official booking app is really not. If he can make a difference and sell it to interested operators, he might even earn a living fee.

When it came to the question of money, Lu Zhou immediately got to the heart, and the mind began to figure out.

Technically, it is very difficult to independently complete the development of an app from front-end to back-end. It is far from writing a simple crawler program that can be based on equal terms, but it is not impossible. What’s more, the algorithm that can’t be solved can also ask system. Consumption of integral query data itself is also a learning process.

When he completes the reward mission and unlocks the artificial intelligence LV0, the Science and Technology branch, these valuable experiences will definitely come in handy.

It’s just that you have to spend a lot of money to buy and maintain a server. It’s a big expense to run the server’s electricity bill and various maintenance costs…

And his card has less than 10,000 pieces, I am afraid it is difficult to burn a small flame.

Biting his teeth, Lu Zhou decided to overcome these problems.

Even 50’s annual salary has been abandoned, what else can’t be done?

Even if you rush to the street, it’s fine to be a master.

So, Lu Zhou closed the program, and did not rush to start changing the code, but opened the word document, just like the outline of thesis, began to design the app’s development process outline.

“The train ticket query must crawl real-time data, the performance requirements of the server are very high, and the code must be as simple as possible!”

“The interface can be simple, but the information must be accurate and comprehensive. You can refer to the mainstream third-party booking app, but it must not be completely similar. There must be innovation…”

Writing here, Lu Zhou’s index finger gently rubbed the keyboard and thought for a long time before he began to type the keyboard.

“The first is Automatic Ticket booking. This shouldn’t be an innovation. A long time ago, Cheetah and 360 browsers already had this feature.”

“But hang up and automatically brush the ticket… It seems that I haven’t seen it yet.” Thinking of last winter vacation, the booking was booked late, and several animals in Dormitory sat in front of the computer and pressed f5 for half an hour to brush out. After a few votes back, Lu Zhou felt deeply that it was not easy for the hard-working people to go home for the New Year.

By constantly refreshing the official website data, there are certain metaphysical probabilities that will send out some votes, some of which are refunds from other users, and some Lu Zhou are not sure how to come out, but this function can be considered.

For example, setting a time period and several train times, the server will automatically help the user to automatically refresh the data, and submit the order at the moment when the remaining ticket appears. As for the several ticket booking software he has seen so far, it seems that this feature is not available.

And in terms of algorithms, it doesn’t seem to be very difficult to implement.

Thinking of this, Lu Zhou looked up at the wall clock.

It’s 1 in the afternoon!

Saved the word document, Lu Zhou slammed his sleeves and put his hands on the keyboard.

“Get started!”


Tap the screen to use advanced tools Tip: You can use left and right keyboard keys to browse between chapters.

You'll Also Like