Two simple xpath case (crawling embarrassments Encyclopedia & scallops words)

1. embarrassments Encyclopedia - etree

analysis


  • Need to use requests crawling pages to extract digital with xpath, re
  • Users can extract information picture links, scripts content, point of praise, praise times
  • Save to json file

Process


  • down the next page
  • Xpath use to extract information
  • Save the file Floor

Source

import requests
from lxml import etree

url = "https://www.

Guess you like

Origin blog.csdn.net/qq_29339467/article/details/105341490