简体   繁体   中英

How do I extract images from Google Images based on user input and place them on a page?

I'm new to web programming, but I had an idea I could use as an instructional tool, and I was hoping I could get some guidance.

Here's my idea: I want to have some form that takes the data entered by the user, submits each word in the form to google images, and retrieves the first image returned by Google Image Search. Each image should be then be pasted in the current document

What language would I need for this (I read about it being disallowed in Javascript due to cross-site scripting?), what kind of topics would I need to learn, and what would the basic template look like for doing such a task?

Thanks.

personally i would have a PHP interface with a python script that does the work. Have a look at urllib in python. You could also try cURL within PHP and just construct the url yourself. If memory serves however google like you to actually be on their website to see their adverts. Pretty sure they block requests that appear like they come from scripts / webhosts.

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