Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.

Commit 7165efe

Browse files
committed
Added py script
1 parent 6262fec commit 7165efe

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import requests
2+
from bs4 import BeautifulSoup
3+
import urllib.request
4+
import random
5+
import os
6+
7+
url="https://www.creativeshrimp.com/top-30-artworks-of-beeple.html"
8+
9+
source_code=requests.get(url)
10+
11+
plain_text=source_code.text
12+
13+
soup=BeautifulSoup(plain_text)
14+
15+
16+
for link in soup.find_all("a",{"class":"lightbox"}):
17+
href=link.get('href')
18+
print(href)
19+
20+
img_name=random.randrange(1,500)
21+
22+
full_name=str(img_name)+".jpg"
23+
24+
urllib.request.urlretrieve(href,full_name)
25+
print("Loop Break")

0 commit comments

Comments
 (0)