简体   繁体   中英

How do I scrape links and images from a website?

I'm new to javascript and would like my first project to be this:

im trying to take the name of channels and thumbnails from this site from source code using a javascript or php to display all thumbnails of channels on my website.

this is i want to catch the a href="this-link" and the img src but from all channels:

<div class="browseThumb">
                <a href="/realmanpwns" target="_top"><img src="//thumbnails.vaughnsoft.com/1427753239/fetch/live/realmanpwns.png" class"browseThumb" width="200" height="113" /></a>
                <div class="browseTxt" onclick="window.location = '/realmanpwns';">
                    <a href="/realmanpwns" target="_top" class="browseTxt">realmanpwns</a>
                </div>
            </div>

Any guidance for how to get started is appreciated.

I used scrapy on a recent project. Didn't know python at the time but I've dabbled with a few other languages and it wasn't difficult to pick up.

They have a ton of resources to learn from.

Here's the direct link: http://scrapy.org

PS. I am in no way affiliated with them, just a happy user.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM