3 ms·
How do you get blurbs from a website?
When you type in a URL on websites like Facebook and Digg, they automatically pull up a blurb of the website that contains the first few sentances of the site.
For example, when typing in cnn.com, the CNN blurb "Breaking news U.S., World, Weather, Entertainment & Video News" and the first few sentances on the CNN website automatically appear as well.
How is this done? Is there some sort of crawler that goes to the link provided? Thanks all.
- Readmore 18y agoI believe what you're talking about is the title of the website. From www.cnn.com <html lang="en"><head><title>CNN.com - Breaking News, U.S., World, Weather, Entertainment & Video News</title> So you could just parse our the title of each site and display that.
- amrithk 18y agoHow can I access this title automatically in the first place? Are you familiar with any PHP solutions in particular? Thanks again
- epi0Bauqu 18y agoYes, that is the work of crawling and parsing. On some sites, they are human edited as well.
- amrithk 18y agoAny resources on how to do this?
- epi0Bauqu 18y agoWell, I am doing this myself at the moment. I use LWP in Perl to crawl. As for generating the description, it depends on what you want to do. You can use combinations of the title and meta tags, or if it is just major sites you want, try to grab a (at least partially) human edited form like from Alexa. What is the application?