Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- from bs4 import BeautifulSoup
- ua = {"User-Agent" : "Mozilla/5.0 (Linux; Android 4.1.1; Nexus 7 Build/JRO03D)"}
- r = requests.get("http://m.dcinside.com/list.php?id=programming", headers=ua)
- soup = BeautifulSoup(r.text, "html.parser")
- for post in soup.select("span.title > span.txt"):
- print(post.text)
Advertisement
Add Comment
Please, Sign In to add comment