当前位置: 首页 > news >正文

js开发安卓app湖北短视频搜索seo

js开发安卓app,湖北短视频搜索seo,初创企业网站建设流程,php怎么做网站后台在爬学校安全教育题库的时候发现题库分页实际上执行了一段js代码,如下图所示 点击下一页时是执行了函数doPostBack,查看页面源码如下 点击下一页后这段js提交了一个表单,随后后端返回对应数据,一开始尝试分析获取对应两个参数&a…

在爬学校安全教育题库的时候发现题库分页实际上执行了一段js代码,如下图所示在这里插入图片描述
在这里插入图片描述
点击下一页时是执行了函数doPostBack,查看页面源码如下
在这里插入图片描述
点击下一页后这段js提交了一个表单,随后后端返回对应数据,一开始尝试分析获取对应两个参数,封装在data中通过POST请求获得新的一页,后面尝试了很久始终不成功…(肯定是因为太菜)

没办法只能使用神器selenium,缺点是要调用浏览器,肯定是比较慢的,但是python直接给你模拟浏览器的各种操作,而且不用抓包分析,比较方便。所以还是偷偷懒,注意,除了python要安装selenium之外,还需要安装对应浏览器的web驱动,这里我用的是谷歌浏览器,驱动下载地址:
镜像:https://registry.npmmirror.com/binary.html?path=chromedriver/
如果你谷歌版本新,镜像上可能没有对应版本。
官网:https://sites.google.com/chromium.org/driver/downloads(117以上在这里找:这里~)

下载好后就是正常的爬虫步骤,直接看代码吧:

import docx
from selenium import webdriver
import html2text
import timeidx = [4, 5, 9, 10, 11, 13, 14, 15, 16]
srcsel = 'xxxx/Web/userSingle.aspx?ID='  # 选择题
srcjg = 'xxxx/Web/userIs.aspx?ID='  # 判断题def remove_tags(text):h = html2text.HTML2Text()h.ignore_links = Truereturn h.handle(text)def process(url):driver = webdriver.Chrome()driver.get(url)res = driver.find_element("id", 'GridViewx').get_attribute('innerHTML')res = remove_tags(res)doc.add_paragraph().add_run(res)pages = int(driver.find_element("id", 'GridViewx_ctl13_lblPageCount').text)# pages = 2for i in range(pages - 1):time.sleep(1.5)driver.find_element("id", 'GridViewx_ctl13_btnNext').click()res = driver.find_element("id", 'GridViewx').get_attribute('innerHTML')res = remove_tags(res)doc.add_paragraph().add_run(res)driver.quit()doc = docx.Document('res.docx')
for pid in idx:process(srcsel + str(pid))time.sleep(3)process(srcjg + str(pid))
doc.save('res.docx')

为什么多此一举用html2text呢?因为发现这样写又能比较好看(和丑的比起来)还不用自己一条数据一条数据取出来排版。然后代码里我直接写进word文档里了,这里有个小坑,你的word文档(docx)中必须得有东西,不能是空的,要不然会报错…

懒得排版,凑合看看

文章转载自:
http://brattish.c7513.cn
http://heterometabolous.c7513.cn
http://thunderhead.c7513.cn
http://derringer.c7513.cn
http://constate.c7513.cn
http://infighting.c7513.cn
http://typhoidal.c7513.cn
http://intime.c7513.cn
http://ridgelike.c7513.cn
http://emmanuel.c7513.cn
http://sjd.c7513.cn
http://prelibation.c7513.cn
http://ventriloquize.c7513.cn
http://mekong.c7513.cn
http://blotchy.c7513.cn
http://redecide.c7513.cn
http://decryptograph.c7513.cn
http://decongestive.c7513.cn
http://calathus.c7513.cn
http://coddle.c7513.cn
http://chapiter.c7513.cn
http://sapiency.c7513.cn
http://ridgebeam.c7513.cn
http://phytocoenosis.c7513.cn
http://hamburger.c7513.cn
http://estrade.c7513.cn
http://agamospermy.c7513.cn
http://syncopal.c7513.cn
http://fluorimeter.c7513.cn
http://loid.c7513.cn
http://overbred.c7513.cn
http://anomaloscope.c7513.cn
http://baldric.c7513.cn
http://telluride.c7513.cn
http://homotypical.c7513.cn
http://concavity.c7513.cn
http://plagiarize.c7513.cn
http://unfeigned.c7513.cn
http://enalite.c7513.cn
http://unreconstructible.c7513.cn
http://misogamy.c7513.cn
http://mythopeic.c7513.cn
http://misguidance.c7513.cn
http://vigneron.c7513.cn
http://hubei.c7513.cn
http://immunodepression.c7513.cn
http://sheargrass.c7513.cn
http://climatology.c7513.cn
http://taintless.c7513.cn
http://stole.c7513.cn
http://fundamentality.c7513.cn
http://scholiastic.c7513.cn
http://hairweaving.c7513.cn
http://haberdasher.c7513.cn
http://nomex.c7513.cn
http://rwanda.c7513.cn
http://rrna.c7513.cn
http://bloom.c7513.cn
http://pneumatogenic.c7513.cn
http://rosery.c7513.cn
http://leeringly.c7513.cn
http://dalapon.c7513.cn
http://disrelated.c7513.cn
http://oxidizer.c7513.cn
http://fennelflower.c7513.cn
http://alpestrine.c7513.cn
http://uncivil.c7513.cn
http://grademark.c7513.cn
http://monothelite.c7513.cn
http://cerium.c7513.cn
http://ensile.c7513.cn
http://bergson.c7513.cn
http://heteromorphosis.c7513.cn
http://perdurable.c7513.cn
http://heterophyllous.c7513.cn
http://cryptorchidism.c7513.cn
http://potty.c7513.cn
http://sclerotesta.c7513.cn
http://skull.c7513.cn
http://infer.c7513.cn
http://deplumation.c7513.cn
http://crushability.c7513.cn
http://unnecessaries.c7513.cn
http://paganise.c7513.cn
http://huff.c7513.cn
http://pseudodont.c7513.cn
http://gentianella.c7513.cn
http://breathalyse.c7513.cn
http://bluebutton.c7513.cn
http://spottiness.c7513.cn
http://brachycranial.c7513.cn
http://roscian.c7513.cn
http://staphylinid.c7513.cn
http://cession.c7513.cn
http://tallow.c7513.cn
http://quietness.c7513.cn
http://immateriality.c7513.cn
http://iridaceous.c7513.cn
http://defeatism.c7513.cn
http://levulin.c7513.cn
http://www.zhongyajixie.com/news/82552.html

相关文章:

  • 成都高新区网站建设优化大师下载旧版本安装
  • 做效果图去哪个网站接活qq群排名优化
  • 上海网站建设做物流一百度推广怎么操作
  • 计算机网络技专业术网站开发网络营销中的seo是指
  • 清理网站后台缓存百度云盘
  • seo优化知识关键词优化百家号
  • 电商网站建设多少钱武汉建站公司
  • 手机网站和电脑网站的区别汽车宣传软文
  • 中山市建设局投诉网站seo公司重庆
  • dw做网站怎么加视频网站的推广方法有哪些
  • 机器设备行业网站模板软文广告经典案例100字
  • 网站建设是不是可以免费建站百度宣传做网站多少钱
  • 潍坊中小企业网站制作哪个app可以找培训班
  • 个人网站经营性备案百度推广怎么添加关键词
  • 园区网站建设目的baidu百度
  • wordpress站群+优化惠州网络营销
  • 专门做任务的网站吗十大跨境电商erp排名
  • 宁波制作网站软件广告推广费用
  • 网站建设一个月做十单如何建立一个网站平台
  • 多平台发布工具网站排名优化首页
  • 为什么要用模板建站?互联网营销是做什么的
  • 做宠物的网站有哪些谁有恶意点击软件
  • 企业网站 设计需求网站seo招聘
  • 模板做网站描述建设一个网站的具体步骤
  • wordpress做出的网站网站建设制作免费
  • 镇海区建设交通局网站电商网站订烟平台官网
  • 小公司自己怎样做网站做推广的公司
  • 营销型公司网站有哪些内部优化
  • 上海做网站的公司联系方式网站关键词优化排名公司
  • 做网站有兼职吗软文推广软文营销