Ledger Nano X - The secure hardware wallet
SHARE
TWEET

crawler

a guest Apr 5th, 2020 284 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import sys
  2. from bs4 import BeautifulSoup
  3. import requests
  4. import urllib.request
  5.  
  6. base_url = 'https://news.naver.com/main/main.nhn?mode=LSD&mid=shm&sid1='
  7. category = [100]
  8.  
  9. for i in category:
  10.     URL = base_url + str(i)
  11.     response = urllib.request.urlopen(URL)
  12.     soup = BeautifulSoup(response, "html.parser")
  13.     #results = soup.select("#section_body .photo a")
  14.     results = soup.select("#section_body > ul.type06_headline > li:nth-child(1) > dl > dt:nth-child(2) > a")
  15.     print(results)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top