Guest User

Untitled

a guest
Oct 15th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. for a in soup.find_all('a', href=True):
  2. print "Found the URL:", a['href']
  3.  
  4. from bs4 import BeautifulSoup
  5. import requests
  6. import re
  7. url = requests.get("https://8ch.net/a/res/869528.html")
  8. soup = BeautifulSoup(url.text,"html.parser")
  9. print soup
  10. for a in soup.find_all(re.compile('([-w]+.(?:jpg|jpeg|png))') ):#'a', href=True):
  11. print "Found the URL:", a #['href']
Add Comment
Please, Sign In to add comment