pikachu 靶场通关
一、 pikachu 靶场搭建 1、准备工作 1.1 搭建环境 Windows PHPStudy pikachu 1.2 下载链接 Pikachu 下载地址: https://github.com/zhuifengshaonianhanlu/pikachu PHPStudy 集成开发环境: https://www.xp.cn/ 数据库连接: https://www.navicat.com.cn/ (暂时不会用到) 2、环境安装 2.1 PHPStudy 下载 v8.1 版 安装路径不能包含中文或空格 ...
利用 pandas 处理国家统计局数据并展示
pandas 的主要数据结构 Series 对象 一种类似一维数组的对象 由一组数据以及一组与之相关的数据标签(即索引)组成 可以存储任何类型的数据 python 1 2 3 4 0 Python 1 Java 2 C++ 索引 数据 创建 Series 对象 Pandas使用Series()函数来创建Series对象,通过这个对象可以调用相应的方法和属性,从而达到处理数据的目的。 ...
复杂结构数据的获取
PubMed 单篇文献基本信息获取 https://pubmed.ncbi.nlm.nih.gov/33883728/ python 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 import requests from lxml import etree url = "https://pubmed.ncbi.nlm.nih.gov/33883728/" r = requests.get(url).text html = etree.HTML(r) title = html.xpath('//*[@id="full-view-heading"]/h1/text()')[0].strip() print(title) authors = html.xpath('//*[@id="full-view-heading"]/div[2]/div/div/span/a/text()') authors = ','.join(authors) print(authors) pmID = html.xpath('//*[@id="full-view-identifiers"]/li[1]/span/strong/text()')[0] print(pmID) mag = html.xpath('//*[@id="full-view-journal-trigger"]/text()')[0].strip() print(mag) info = html.xpath('//*[@id="full-view-heading"]/div[1]/div[2]/span[2]/text()')[0].split(';') year = info[0][:4] info = info[1] print(info) print(year) abstract = html.xpath('//*[@id="eng-abstract"]/p/text()')[0].strip() print(abstract) try: kw = html.xpath('/html/body/div[5]/main/div[2]/p/text()')[1].strip() print(kw) except: pass PubMed 多篇文献基本信息获取 文章对应链接的获取 在搜索页中,默认为十篇,先爬取一篇文章的链接 ...