Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from bs4 import BeautifulSoup
- import urllib.request
- req = urllib.request.Request("http://boards.4chan.org/g/catalog", headers={'User-Agent' : "Magic Browser"})
- soup = BeautifulSoup(urllib.request.urlopen(req), "html.parser")
- data2 = soup.find_all("div", attrs={"id": "threads"})
- print (data2)
- data3 = soup.find_all("div", attrs={"class": "thread"})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement