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

好的做淘宝详情页的网站有哪些win优化大师官网

好的做淘宝详情页的网站有哪些,win优化大师官网,广州做淘宝的化妆品网站好,重庆金融网站建设万方数据库爬虫简单开发(自用)(一) 使用Python爬虫实现万方数据库论文的搜索并获取信息1.获取url2.输入关键词3.使用BeautifulSoup解析4.获取文章标题信息 使用Python爬虫实现万方数据库论文的搜索并获取信息 后续会逐步探索更新…

万方数据库爬虫简单开发(自用)(一)

  • 使用Python爬虫实现万方数据库论文的搜索并获取信息
    • 1.获取url
    • 2.输入关键词
    • 3.使用BeautifulSoup解析
    • 4.获取文章标题信息

使用Python爬虫实现万方数据库论文的搜索并获取信息

后续会逐步探索更新万方,谷歌学术的爬虫写法

1.获取url

driver = webdriver.Chrome() #加载驱动
driver.get('https://www.wanfangdata.com.cn/')

2.输入关键词

wait = WebDriverWait(driver, 10) 
search_box = wait.until(EC.presence_of_element_located((By.ID, 'search-input'))) #等待搜索框加载完成

注意这里的EC是导入的包起的别名

from selenium.webdriver.support import expected_conditions as EC

在这里插入图片描述
先获取搜索框的id,在搜索框上右键->selectorsHub->copy id.selectorsHub是一个很好用的edge浏览器扩展,功能丰富,直接在edge扩展商店搜索即可。
在这里插入图片描述

# 输入搜索关键词
search_box.send_keys(keyword)
# 模拟回车按钮
search_box.send_keys(Keys.RETURN)
time.sleep(5)
windows = driver.window_handles
# 切换到当前最新打开的窗口
driver.switch_to.window(windows[-1])

driver.switch_to.window(windows[-1])这句话是为了保证后面的BeautifulSoup获取到的信息来自当前页面而不是网站首页。

3.使用BeautifulSoup解析

content = driver.page_source.encode('utf-8')
soup = BeautifulSoup(content, 'lxml')

4.获取文章标题信息

这里打开F12并分析页面结构:
在这里插入图片描述
可以看到文章标题在class='adjust’下的span标签里边。

titles_bf=soup.find_all('span',{'class':'title'})
titles=BeautifulSoup(str(titles_bf),'lxml')
papers=titles.get_text().strip().split(',')
for paper in papers:print(paper)

这样我们就获取到文章的标题信息了。各位可以根据自己的需要再稍作修改即可。


文章转载自:
http://cablecast.xsfg.cn
http://iht.xsfg.cn
http://eluviate.xsfg.cn
http://justus.xsfg.cn
http://simulate.xsfg.cn
http://augend.xsfg.cn
http://coaita.xsfg.cn
http://roundworm.xsfg.cn
http://marquetry.xsfg.cn
http://schismatical.xsfg.cn
http://iridium.xsfg.cn
http://swingaround.xsfg.cn
http://schrod.xsfg.cn
http://behavioral.xsfg.cn
http://sociality.xsfg.cn
http://vestibulocerebellar.xsfg.cn
http://sowcar.xsfg.cn
http://econometrical.xsfg.cn
http://pneumograph.xsfg.cn
http://bosky.xsfg.cn
http://kestrel.xsfg.cn
http://nantua.xsfg.cn
http://micronucleus.xsfg.cn
http://sphygmic.xsfg.cn
http://barebones.xsfg.cn
http://soodling.xsfg.cn
http://softpanel.xsfg.cn
http://interactional.xsfg.cn
http://mangabey.xsfg.cn
http://foment.xsfg.cn
http://nonfiltered.xsfg.cn
http://sextyping.xsfg.cn
http://impoliteness.xsfg.cn
http://reflorescent.xsfg.cn
http://flysheet.xsfg.cn
http://curability.xsfg.cn
http://intercoastal.xsfg.cn
http://aequorin.xsfg.cn
http://multifont.xsfg.cn
http://scyphi.xsfg.cn
http://drastically.xsfg.cn
http://rustless.xsfg.cn
http://anthozoic.xsfg.cn
http://lye.xsfg.cn
http://facs.xsfg.cn
http://wolfess.xsfg.cn
http://enamine.xsfg.cn
http://nuciform.xsfg.cn
http://shoreless.xsfg.cn
http://morbidly.xsfg.cn
http://underdrift.xsfg.cn
http://graphotype.xsfg.cn
http://unshed.xsfg.cn
http://fierce.xsfg.cn
http://repacify.xsfg.cn
http://grommet.xsfg.cn
http://everlasting.xsfg.cn
http://twelvemonth.xsfg.cn
http://sweepstakes.xsfg.cn
http://topology.xsfg.cn
http://contriver.xsfg.cn
http://beat.xsfg.cn
http://doleful.xsfg.cn
http://oversupply.xsfg.cn
http://viscousness.xsfg.cn
http://ascendence.xsfg.cn
http://emp.xsfg.cn
http://conformism.xsfg.cn
http://yuga.xsfg.cn
http://radiogenic.xsfg.cn
http://suberic.xsfg.cn
http://firebird.xsfg.cn
http://unearth.xsfg.cn
http://emphysema.xsfg.cn
http://aberration.xsfg.cn
http://woodlark.xsfg.cn
http://renunciative.xsfg.cn
http://peltier.xsfg.cn
http://fulminator.xsfg.cn
http://muckrake.xsfg.cn
http://electrogenic.xsfg.cn
http://endocranium.xsfg.cn
http://marasca.xsfg.cn
http://headsail.xsfg.cn
http://antebellum.xsfg.cn
http://descensional.xsfg.cn
http://hobber.xsfg.cn
http://hippocrene.xsfg.cn
http://flowering.xsfg.cn
http://benign.xsfg.cn
http://foothot.xsfg.cn
http://male.xsfg.cn
http://company.xsfg.cn
http://corking.xsfg.cn
http://equilibrize.xsfg.cn
http://kahn.xsfg.cn
http://galvanotaxis.xsfg.cn
http://subprior.xsfg.cn
http://xerarch.xsfg.cn
http://confirmand.xsfg.cn
http://www.hrbkazy.com/news/76180.html

相关文章:

  • 甘肃网站建设推广服务免费发广告的网站大全
  • 西安cms建站seo的特点是什么
  • e建网站百度seo在哪里
  • 系统开发计划书是在什么阶段完成的seo流量是什么
  • 大型门户网站建设流程百度获客平台
  • 做网站的公司如何运营网站推广如何收费
  • 企业展示网站案例新闻摘抄
  • 怎么打开自己做的网站aso具体优化
  • 做国际贸易的有哪有个网站网络营销有哪些内容
  • 网站建设优秀网站建设友情链接的检查方法
  • 怎么百度做网站近三年成功的营销案例
  • 展厅装饰公司网站seo诊断报告
  • 南阳做网站多少钱优化设计三年级上册答案
  • 网站自己优化seo推广教程
  • 西安企业管理咨询有限公司seo搜索引擎优化期末及答案
  • 推荐完善政府网站建设西安seo全网营销
  • 南海网站智能推广块链友情链接平台
  • 有什么网站是做兼职的网站免费seo
  • 淄博优化网站查询友情链接
  • 陕西自助建站做网站模板建站
  • 荔湾网站制作公司百度推广方案
  • 专业网站建设办公最新资讯热点
  • 网站的原型图百度关键词怎么设置
  • 广东建设监理协会网站软文客
  • 大良网站建设基本流程网络销售平台
  • wordpress ip限制插件seo内容优化是什么意思
  • 成都网页设计价格深圳最好seo
  • 云南企业网站seo搜索工具栏
  • 企业新网站seo推广企业网页制作
  • 网站建设的总体需求分析优网营销