Reborn in 2000, starting from the university website
Chapter 57 Blocking Crawlers
"Moving?" Zhang Jian got up and quickly went over to take a look. "Holy crap, this crawling frequency, this is a web crawler! Who the hell is so unethical as to crawl our users' posts in the middle of the night?"
"Check the IP address." Bai Yuhang's eyes narrowed, and he sat up straight.
Wan Lianghao's fingers flew across the website access data log, and a few seconds later, a line of addresses popped up.
"IP address location... Beijing." Wan Lianghao turned to look at Bai Yuhang, "HD zone IP segment."
The air in the private room froze instantly.
Beijing, Haidian District, web scraping technology.
When these words are combined, their connotations are all too obvious in this day and age.
The man who had just returned from overseas and rented a hotel room in Zhongguancun to start working on search engines, or those portal giants that were undergoing painful transformations, had already smelled the bloodshed here.
"It seems our actions are indeed more significant than we anticipated." Bai Yuhang stared at the flashing IP address, a cold smile playing on his lips. He casually picked up a lighter from the table and lit it with a "click." "This is a good thing. It means we've caught the eye of the real elite forces. Let them crawl. We'll change our firewall strategy, making them suffer losses bit by bit, not letting them get too comfortable."
As Wan Lianghao spoke, he modified the firewall policy according to Bai Yuhang's idea. He filtered out IPs that repeatedly refreshed the network within a short period from all access requests to Qihang's intranet and added verification. Then, the group stared at the constantly changing logs on the screen, their brows furrowing deeper and deeper. Finally, they couldn't help but poke the monitor with their pen caps: "This bastard hasn't stopped; the frequency is even higher. Look at these request paths, he's specifically targeting the 'class member list' and 'user profile.' He's trying to steal our entire household register!"
"The IP address in the HD zone, still awake? Another poor soul working overtime." Zhang Jian leaned over and glanced at it, mumbling under his breath, "What a shameless bastard! We worked so hard to recruit people, and he thinks he can just freeload with a script? Sixth Brother, should I trace the IP address and plant a Trojan on his server?"
"Don't mess around. We're a legitimate company, we don't do hacking stuff." Bai Yuhang placed the cigarette he had just lit on the ashtray, leaned forward, and stared at the lines of greedy access records.
In 2000, the Internet was still a wilderness. In order to expand their content databases, major portals and search engines sent out crawlers like locusts, leaving nothing but desolation in their wake.
Later, the well-known robots.txt protocol was seen as a mere formality by most website owners, let alone any concept of privacy protection.
But in Bai Yuhang's eyes, this is not just a matter of a few pages. The crawled data cannot expand the search engine results for Qihang Campus Network. On the contrary, it exposes user information to the public Internet, which is undermining the foundation of Qihang.
"He's stealing our network of connections." Bai Yuhang tapped his fingers lightly on the table. "Our most valuable asset isn't our web pages, it's our 'who knows whom' network. If Baidu or some other portal takes it, our moat will be breached."
"Then what should we do? Block the IP?" Wan Lianghao looked at Bai Yuhang. "Blocking one will just mean someone will switch to a different proxy or IP and keep crawling. It's only a temporary solution."
"Then close the gate and build a wall." Bai Yuhang's eyes sharpened, and he quickly made a decision. "Third brother, listen to me, change the code. Enable mandatory login verification for the entire site. Visitors can only see the homepage and registration page. Want to see the inner pages? Want to see photos of the class beauty? Want to see who is whose classmate? You must log in."
"Complete ban?" Wan Lianghao was stunned for a moment. "Sixth Brother, this is a double-edged sword. If search engines can't find us, then our content won't be searchable online anymore. Isn't that the same as cutting ourselves off from netizens and users? Nowadays, websites are practically ready to take their pants off and show them to search engines."
"We're different. We're building a social network among acquaintances, a real social network, not a news portal," Bai Yuhang said firmly. "What we value is privacy and security. Think about it, if any girl's photo could be found on Baidu by anyone with her name on it, would she dare to post it? Only by building a high wall can those inside the wall truly thrive. As for traffic? We rely on word-of-mouth referrals; we don't need those cold, hard crawlers to lead the way."
Seeing that Wan Lianghao was still hesitating, Bai Yuhang directly threw out his trump card: "Add another layer of security. For those IPs with abnormally high access frequency, directly display a CAPTCHA when accessing the page."
"Verification code? What's that?" The people in the room all looked blank.
"It generates an image full of noise and interference lines, with a few randomly written, crooked letters or numbers on it. Users have to enter the correct information to continue accessing the site. There's a code module on the CSDN developer forum that you can directly call. You can download it, debug it, and use it directly." Bai Yuhang casually sketched a draft on a piece of paper. "The CAPTCHA is barely recognizable to the human eye, but current search engine crawler OCR technology absolutely cannot recognize it. It's specifically designed to deal with these uninvited script bots."
Wan Lianghao's eyes lit up instantly, and he slapped his thigh: "Holy crap, this is a brilliant move! It doesn't require blocking IPs, and it'll drive those web crawlers crazy. Okay, I'll do it right now!"
The sound of keyboard typing filled the private room once again.
Wan Lianghao chuckled mischievously as he wrote, as if he could already see the programmer on the other side scratching his head in frustration.
Twenty minutes later.
"Online!"
As Wan Lianghao pressed Enter, the screen in the firewall logs changed instantly. The IP from the HD zone was still frantically making requests, but the returned status code changed from a consistently green "200" to a dismal red "403 Forbidden" and redirection request.
"Oh dear, still testing it?" Wan Lianghao chuckled as he looked at the log. "This crawler robot is probably bewildered. It was just enjoying a free buffet when it was suddenly thrown out by security."
"Let him try." Bai Yuhang looked at the red "access denied" records, stubbed out his cigarette, and said, "When he realizes he can't even crawl a punctuation mark, he'll naturally behave. Our data is a gold mine. Want to enter the mine? Either buy a ticket or find the ore and dig it yourself. Want to steal it? No way."
Wan Lianghao watched as the abnormal traffic on the screen finally slowed down and disappeared, then let out a long sigh of relief. He unscrewed a bottle of iced tea and took a big gulp: "Awesome! Sixth Brother, we've blocked the search engine crawler, so our server load will be much lower. Hey, do you think those guys on the other side are cursing me out now?"
"They'll definitely curse us out." Bai Yuhang leaned back in his chair, a playful smile playing on his lips. "But after they're done cursing, they should start thinking about how to value us. After all, a website that even web crawlers can't crawl really means that the stuff inside is truly valuable."
You'll Also Like
-
The transmigrated villain wants to escape Feng Aotian's hellish situation.
Chapter 365 3 minute ago -
In music anime, band girls won't be alone.
Chapter 192 3 minute ago -
No kidding, even Rocks would have to offer me a cigarette.
Chapter 137 3 minute ago -
My anime-style card deck is fine!
Chapter 304 3 minute ago -
Practical teaching, all I want is your reward.
Chapter 251 3 minute ago -
I'm on the Ark, and I start out as Gretchen.
Chapter 272 3 minute ago -
If you're going on a blind date, do it properly, don't confiscate my property!
Chapter 43 3 minute ago -
Surviving in the chaos of battle, I'm grinding for proficiency.
Chapter 105 3 minute ago -
Reborn in 2000, starting from the university website
Chapter 118 3 minute ago -
Li Zhuiyuan, a corpse retriever, travels through a mysterious resurrection.
Chapter 83 3 minute ago