Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

Img link grabber

Hello everybody
I need script to pull all img links from site just like google images
the problem you might face is
that the rest of the images
when you scroll down a new images will show up
etc
and after it grab all img links from the html or the page
store it on a file
then on linux
for each link on the text
open firefox + link of the image
that it
hope my thread is clear
summery
I need scripts that grab img links from website
you can give me an example and i will modify it
as long as you explain it well :D
note I'm using Ubuntu and Windows
below are the steps to extract the links as the rest are relatively simple for you to google
1)use selenium to visit the site
2)grab all the image links using css selector and put them in a set
3)then use selenium to simulate the END button keypress and repeat step 2 again


Note you can run them in a loop and stop after 30 runs or so. So to sum it up you need knowledge of 1) python 2) css selector 3) selenium
Well your replay was going to be perfect
If you provided an example source code
pls provide a source code for your replay
I clearly asked for python script
Thanks
I will also try your answer for now
You can try with BeautifulSoup and requests.
This is just one example, how I grab specific image from Steam.
Python 2.7
Code
import requests
from bs4 import BeautifulSoup
page = requests.get(steam_game_link)
soup = BeautifulSoup(page.content , 'lxml')
background_imgs = soup.find_all('img', {'class':'game_header_image_full'})
for background_img in background_imgs:
       background_img = background_img.get('src')

I think if you make some changes, you are able to grab all links from page.
(Dec 11, 2015 08:46 AM)Helltoy Wrote:  You can try with BeautifulSoup and requests.
This is just one example, how I grab specific image from Steam.
Python 2.7
Code
import requests
from bs4 import BeautifulSoup
page = requests.get(steam_game_link)
soup = BeautifulSoup(page.content , 'lxml')
background_imgs = soup.find_all('img', {'class':'game_header_image_full'})
for background_img in background_imgs:
       background_img = background_img.get('src')

I think if you make some changes, you are able to grab all links from page.

note he has to scroll down such that new pages are able to load. i don't think you can do that with bs4.
my method definitely works since i have done that for pinterest and it is the same as what he describes
Use firefox and download DownThemAll here is the link
https://addons.mozilla.org/nl/firefox/ad...wnthemall/


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by BestandsextensieNov 14, 2018 07:49 PM 4 213 Nov 14, 2018 07:49 PM
Last Post: Louis
[C#] by CaptainBriApr 18, 2017 02:11 AM 48 7,780 Apr 18, 2017 02:11 AM
Last Post: nr42
[Python] by Coffee is loveJan 29, 2017 04:56 PM 1 97 Jan 29, 2017 04:56 PM
Last Post: HFDone