Skip to content

Commit b4f80bb

Browse files
committed
add
1 parent c7df153 commit b4f80bb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from urllib.request import urlopen
2+
from bs4 import BeautifulSoup
3+
import re
4+
html = urlopen('https://www.pythonscraping.com/pages/page3.html')
5+
bs = BeautifulSoup(html, 'html.parser')
6+
7+
images = bs.find_all('img',
8+
{'src': re.compile('\.\.\/img\/gifts/img.*.jpg')})
9+
print(images)
10+
print('='*60)
11+
for image in images:
12+
print(image['src'])

0 commit comments

Comments
 (0)