Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from urllib.request import urlopen
- from urllib.error import HTTPError
- from bs4 import BeautifulSoup
- import re
- try:
- content = urlopen("watch-at-cafe-6-online-free.html")
- soup = BeautifulSoup(content.read(),"html.parser")
- except HTTPErrrot as he:
- print(he)
- #exit()
- #continue
- except AttributeError as ae:
- print(ae)
- exit()
- #print(soup.h1)
- for link in soup.find_all('a'):
- print(link.get('href'))
- #how do i get this to out-put an lxml file ?????????
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement