Guest User

Untitled

a guest
Sep 22nd, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. import requests
  2. from bs4 import BeautifulSoup
  3.  
  4. ua = {"User-Agent" : "Mozilla/5.0 (Linux; Android 4.1.1; Nexus 7 Build/JRO03D)"}
  5.  
  6. r = requests.get("http://m.dcinside.com/list.php?id=programming", headers=ua)
  7. soup = BeautifulSoup(r.text, "html.parser")
  8.  
  9.  
  10. for post in soup.select("span.title > span.txt"):
  11.   print(post.text)
Advertisement
Add Comment
Please, Sign In to add comment