千锋教育-做有情怀、有良心、有品质的职业教育机构

手机站
千锋教育

千锋学习站 | 随时随地免费学

千锋教育

扫一扫进入千锋手机站

领取全套视频
千锋教育

关注千锋学习站小程序
随时随地免费学习课程

当前位置:首页  >  技术干货  > python爬虫函数大全

python爬虫函数大全

来源:千锋教育
发布人:xqq
时间: 2024-02-27 07:04:29 1708988669

Python爬虫函数大全

_x000D_

Python爬虫是一种自动化获取互联网上数据的技术,它可以帮助我们快速、高效地从网页中提取所需信息。而在Python中,有许多强大的爬虫函数可以帮助我们实现这一目标。本文将介绍一些常用的Python爬虫函数,并展示它们的用法和效果。

_x000D_

一、requests库

_x000D_

requests库是Python中最常用的HTTP库之一,它提供了简洁而强大的API,可以轻松地发送HTTP请求和处理响应。下面是一些常用的requests函数:

_x000D_

1. get(url, params=None, **kwargs):发送GET请求,返回一个Response对象。

_x000D_

2. post(url, data=None, json=None, **kwargs):发送POST请求,返回一个Response对象。

_x000D_

3. put(url, data=None, **kwargs):发送PUT请求,返回一个Response对象。

_x000D_

4. delete(url, **kwargs):发送DELETE请求,返回一个Response对象。

_x000D_

5. head(url, **kwargs):发送HEAD请求,返回一个Response对象。

_x000D_

二、BeautifulSoup库

_x000D_

BeautifulSoup库是Python中一个用于解析HTML和XML文档的库,它可以帮助我们从网页中提取所需的数据。下面是一些常用的BeautifulSoup函数:

_x000D_

1. BeautifulSoup(markup, features=None):将HTML或XML文档解析为BeautifulSoup对象。

_x000D_

2. find(name, attrs, recursive, string, **kwargs):查找第一个匹配指定条件的元素,返回一个Tag对象。

_x000D_

3. find_all(name, attrs, recursive, string, limit, **kwargs):查找所有匹配指定条件的元素,返回一个Tag对象的列表。

_x000D_

4. select(selector):使用CSS选择器查找匹配的元素,返回一个Tag对象的列表。

_x000D_

三、re库

_x000D_

re库是Python中用于处理正则表达式的库,它可以帮助我们从文本中提取所需的数据。下面是一些常用的re函数:

_x000D_

1. match(pattern, string, flags=0):从字符串的开头匹配正则表达式,返回一个匹配对象。

_x000D_

2. search(pattern, string, flags=0):在字符串中搜索匹配正则表达式的第一个位置,返回一个匹配对象。

_x000D_

3. findall(pattern, string, flags=0):在字符串中搜索匹配正则表达式的所有位置,返回一个匹配对象的列表。

_x000D_

4. sub(pattern, repl, string, count=0, flags=0):将字符串中匹配正则表达式的部分替换为指定的字符串,返回替换后的字符串。

_x000D_

**问:如何使用requests库发送GET请求?**

_x000D_

答:使用requests库发送GET请求非常简单,只需调用get函数并传入待请求的URL即可。例如:

_x000D_

`python

_x000D_

import requests

_x000D_

response = requests.get('https://www.example.com')

_x000D_

print(response.text)

_x000D_ _x000D_

该代码会发送一个GET请求到'https://www.example.com',并打印出响应内容。

_x000D_

**问:如何使用BeautifulSoup库解析HTML文档?**

_x000D_

答:使用BeautifulSoup库解析HTML文档也非常简单,只需将HTML文档传入BeautifulSoup函数即可。例如:

_x000D_

`python

_x000D_

from bs4 import BeautifulSoup

_x000D_

html = '''

_x000D_ _x000D_ _x000D_

Example

_x000D_ _x000D_

_x000D_

Hello, World!

_x000D_

_x000D_ _x000D_

'''

_x000D_

soup = BeautifulSoup(html, 'html.parser')

_x000D_

print(soup.title.text)

_x000D_ _x000D_

该代码会将HTML文档解析为BeautifulSoup对象,并打印出标签中的文本内容。</p>_x000D_ <p style="text-indent: 2em;">**问:如何使用re库提取文本中的URL?**</p>_x000D_ <p style="text-indent: 2em;">答:使用re库提取文本中的URL可以通过正则表达式来实现。例如,要提取文本中的所有URL,可以使用findall函数。例如:</p>_x000D_ <p style="text-indent: 2em;"><span style="color:#C7254E;background: #F9F2F4;"></span>`python</p>_x000D_ <p style="text-indent: 2em;">import re</p>_x000D_ <p style="text-indent: 2em;">text = 'Visit my website at https://www.example.com and https://www.google.com'</p>_x000D_ <p style="text-indent: 2em;">urls = re.findall(r'https?://\S+', text)</p>_x000D_ <p style="text-indent: 2em;">print(urls)</p>_x000D_ _x000D_ <p style="text-indent: 2em;">该代码会打印出文本中的所有URL。</p>_x000D_ <p style="text-indent: 2em;">通过以上的介绍,我们可以看到Python爬虫函数大全中的一些常用函数和它们的用法。这些函数可以帮助我们快速、高效地实现爬虫任务。无论是发送HTTP请求、解析HTML文档还是提取文本中的数据,Python爬虫函数大全都能够提供强大的支持。希望本文能够对你有所帮助!</p>_x000D_ </div> <div class="tag-wrap" style="margin: 30px auto 0;width: 810px;display: -ms-flexbox;display: flex;-ms-flex-align: center;align-items: center;"> <span class="tag-label" style="font-size: 16px; line-height: 22px;margin-right: 6px;">tags:</span> <a id="tag_click" target="_blank" style="display: inline-block" href="http://www.mobiletrain.org/tag-0-1.html">python教程</a> </div> <div class="con-left-bottom"> 声明:本站稿件版权均属千锋教育所有,未经许可不得擅自转载。 </div> <div class="left-form"> <div class="left-form-left"> <div class="h3">10年以上业内强师集结,手把手带你蜕变精英</div> <div class="list-form-item"> <i class="ypfont yp-name"></i> <input type="text" placeholder="您的姓名" name="realname" id="realname" autocomplete="off" /> </div> <div class="list-form-item list-form-item2"> <i class="ypfont yp-shouji"></i> <input type="text" placeholder="您的电话" name="realphone" id="phone" autocomplete="off" /> </div> <div class="h4">请您保持通讯畅通,专属学习老师24小时内将与您1V1沟通</div> <div class="list-submit"> 免费领取<br /><i class="ypfont yp-dianjitianjia"></i> </div> </div> <div class="left-form-right"> <div class="h3">今日已有<span>369</span>人领取成功</div> <div class="swiper-container swiper-phone swiper-no-swiping"> <div class="swiper-wrapper"> <div class="swiper-slide"> 刘同学 138****2860 刚刚成功领取 </div> <div class="swiper-slide"> 王同学 131****2015 刚刚成功领取 </div> <div class="swiper-slide"> 张同学 133****4652 刚刚成功领取 </div> <div class="swiper-slide"> 李同学 135****8607 刚刚成功领取 </div> <div class="swiper-slide"> 杨同学 132****5667 刚刚成功领取 </div> <div class="swiper-slide"> 岳同学 134****6652 刚刚成功领取 </div> <div class="swiper-slide"> 梁同学 157****2950 刚刚成功领取 </div> <div class="swiper-slide"> 刘同学 189****1015 刚刚成功领取 </div> <div class="swiper-slide"> 张同学 155****4678 刚刚成功领取 </div> <div class="swiper-slide"> 邹同学 139****2907 刚刚成功领取 </div> <div class="swiper-slide"> 董同学 138****2867 刚刚成功领取 </div> <div class="swiper-slide"> 周同学 136****3602 刚刚成功领取 </div> </div> </div> </div> </div> </div> <div class="c_page_bottom"> <div class="c_page_bottom_item"> <div class="c_page_bottom_item_up"></div> <p>上一篇</p> <a href="http://www.mobiletrain.org/about/BBS/287809.html" title="287811" target="_blank">python求最小值函数</a> </div> <div class="c_page_bottom_item"> <div class="c_page_bottom_item_next"></div> <p>下一篇</p> <a href="http://www.mobiletrain.org/about/BBS/287814.html" target="_blank" title="287811">python画图函数大全</a> </div> </div> <div class="left-ad"> <a href="javascript:;" onclick="open53_pc()" rel="nofollow" class="left-ad-btn"> 免费打包获取<i class="ypfont yp-dianjitianjia"></i> </a> </div> <!-- <div class="article"> <div class="article-left"> <h3 class="art-tit">猜你喜欢<span>LIKE</span></h3> <div class="art-con"> <a href="http://www.mobiletrain.org/zcjy/wlaq/268563.html" target="_blank" class="art-item"> <div class="art-item-img"> <img src="/tywzt/ty45.jpg" alt="" /> </div> <div class="art-item-info"> <h4>网络安全现在的就业薪资怎么样</h4> <span> <i class="ypfont yp-shijian"></i> 2023-12-25 </span> </div> </a> <a href="http://www.mobiletrain.org/zcjy/wlaq/268562.html" target="_blank" class="art-item"> <div class="art-item-img"> <img src="/tywzt/ty46.jpg" alt="" /> </div> <div class="art-item-info"> <h4>学习网络安全编程好就业吗</h4> <span> <i class="ypfont yp-shijian"></i> 2023-12-25 </span> </div> </a> <a href="http://www.mobiletrain.org/zcjy/wlaq/268560.html" target="_blank" class="art-item"> <div class="art-item-img"> <img src="/tywzt/ty47.jpg" alt="" /> </div> <div class="art-item-info"> <h4>网络安全编程就业方向如何</h4> <span> <i class="ypfont yp-shijian"></i> 2023-12-25 </span> </div> </a> </div> </div> <div class="article-right"> <h3 class="art-tit">最新文章<span>NEW</span></h3> <div class="art-con"> <a href="http://www.mobiletrain.org/about/BBS/287996.html" target="_blank" class="art-item"> <div class="art-item-img"> <img src="/tywzt/ty47.jpg" alt="" /> </div> <div class="art-item-info"> <h4>pycharm与python版本匹配</h4> <span> <i class="ypfont yp-shijian"></i> 2024-02-27 </span> </div> </a> <a href="http://www.mobiletrain.org/about/BBS/287871.html" target="_blank" class="art-item"> <div class="art-item-img"> <img src="/tywzt/ty49.jpg" alt="" /> </div> <div class="art-item-info"> <h4>python魔法函数大全</h4> <span> <i class="ypfont yp-shijian"></i> 2024-02-27 </span> </div> </a> <a href="http://www.mobiletrain.org/about/BBS/287869.html" target="_blank" class="art-item"> <div class="art-item-img"> <img src="/tywzt/tongyong2.jpg" alt="" /> </div> <div class="art-item-info"> <h4>python里面openpyxl怎么用</h4> <span> <i class="ypfont yp-shijian"></i> 2024-02-27 </span> </div> </a> </div> </div> </div> --> <div class="article article-hot" style="margin-top: 20px"> <div class="article-tit-box"> <div class="art-tit h3"> 相关推荐<span class="art-hot">HOT</span> </div> <!-- <a href="javascript:;" onclick="open53_pc()">更多>></a> --> </div> <div class="art-con"> <a href="http://www.mobiletrain.org/about/BBS/287903.html" target="_blank" class="art-item"> <div class="art-item-img"> <img src="/tywzt/ty69.jpg" alt="" /> </div> <div class="art-item-info"> <div class="h4">append在python中的作用</div> <p> **append在python中的作用**_x000D_在Python编程语言中,append()是一种常用的列表操作函数,用于在列表末尾添加元素。它的作用是将给定的对象...<span>详情>></span> </p> <span>2024-02-27 13:43:35</span> </div> </a> <a href="http://www.mobiletrain.org/about/BBS/287886.html" target="_blank" class="art-item"> <div class="art-item-img"> <img src="/tywzt/ty50.jpg" alt="" /> </div> <div class="art-item-info"> <div class="h4">在python中调用process类</div> <p> 在Python中,调用Process类是一种常见的多进程编程方式。Process类是multiprocessing模块中的一个重要组件,它允许我们创建和控制子进程,实现...<span>详情>></span> </p> <span>2024-02-27 12:04:03</span> </div> </a> <a href="http://www.mobiletrain.org/about/BBS/287857.html" target="_blank" class="art-item"> <div class="art-item-img"> <img src="/tywzt/tongyong12.jpg" alt="" /> </div> <div class="art-item-info"> <div class="h4">python转字符串函数</div> <p> **Python转字符串函数的强大威力**_x000D_Python作为一种高级编程语言,提供了许多强大的函数和方法,其中转字符串函数是非常重要的一个。在Pyt...<span>详情>></span> </p> <span>2024-02-27 10:07:36</span> </div> </a> <a href="http://www.mobiletrain.org/about/BBS/287847.html" target="_blank" class="art-item"> <div class="art-item-img"> <img src="/tywzt/ty70.jpg" alt="" /> </div> <div class="art-item-info"> <div class="h4">python编写一个函数</div> <p> **Python编写一个函数:简化代码,提高效率**_x000D_**Python编写一个函数**_x000D_Python是一种高级编程语言,它以其简洁的语法和强大的功能而...<span>详情>></span> </p> <span>2024-02-27 09:25:55</span> </div> </a> <a href="http://www.mobiletrain.org/about/BBS/287845.html" target="_blank" class="art-item"> <div class="art-item-img"> <img src="/tywzt/ty56.jpg" alt="" /> </div> <div class="art-item-info"> <div class="h4">python给dataframe添加一列</div> <p> Python是一种功能强大的编程语言,广泛用于数据分析和处理。在数据分析过程中,我们经常需要对数据进行处理和转换,其中包括给DataFrame添加新...<span>详情>></span> </p> <span>2024-02-27 09:18:00</span> </div> </a> </div> </div> </div> </div> <div class="con-right"> <div class="con-right-rywd"> <div class="rywd-tit h3"> <i class="ypfont yp-weinituijian"></i>热门推荐 </div> <div class="swiper3"> <a href="http://www.mobiletrain.org/about/BBS/288002.html" target="_blank"> <div class="ypfont yp-zhiding"></div> <p>pycharm对应的python版本</p> <span class="a11">沸</span> </a> <a href="http://www.mobiletrain.org/about/BBS/287999.html" target="_blank"> <div class="ypfont yp-1"></div> <p>pycharm和python版本对应</p> <span class="a21">热</span> </a> <a href="http://www.mobiletrain.org/about/BBS/287996.html" target="_blank"> <div class="ypfont yp-2"></div> <p>pycharm与python版本匹配</p> <span class="a31">热</span> </a> <a href="http://www.mobiletrain.org/about/BBS/287909.html" target="_blank"> <div class="ypfont yp-3"></div> <p>append是什么意思python</p> <span class="a41">新</span> </a> <a href="http://www.mobiletrain.org/about/BBS/287907.html" target="_blank"> <div class="a5"> 4 </div> <p>append在python中的用法</p> </a> <a href="http://www.mobiletrain.org/about/BBS/287905.html" target="_blank"> <div class="a6"> 5 </div> <p>append在python中的含义</p> </a> <a href="http://www.mobiletrain.org/about/BBS/287903.html" target="_blank"> <div class="a7"> 6 </div> <p>append在python中的作用</p> </a> <a href="http://www.mobiletrain.org/about/BBS/287901.html" target="_blank"> <div class="a8"> 7 </div> <p>.format在python中的用法</p> </a> <a href="http://www.mobiletrain.org/about/BBS/287890.html" target="_blank"> <div class="a9"> 8 </div> <p>高中python常用函数</p> </a> <a href="http://www.mobiletrain.org/about/BBS/287888.html" target="_blank"> <div class="a10"> 9 </div> <p>属于python内置函数</p> </a> </div> <!-- <div class="swiper-button-prev swiper-button-prev3"> <i class="indexfont index-youjiantou-copy"></i> </div> <div class="swiper-button-next swiper-button-next3"> <i class="ypfont yp-huanyipi"></i>换一批 </div> --> </div> <!-- 面试题库 --> <a href="javascript:;" rel="nofollow" onclick="open53_pc()" class="right-ad"> <img src="/images/right-ad.jpg" alt="" /></a> <!-- 技术干货 --> <div class="con-right-rywd"> <div class="tk-tit h3"> <a class="left" href="http://www.mobiletrain.org/about/BBS/" target="_blank"><i class="ypfont yp-fabujishu" ></i>技术干货</a> <a href="http://www.mobiletrain.org/about/BBS/" target="_blank">更多>></a> </div> <div class="swiper2 "> <a href="http://www.mobiletrain.org/about/BBS/258998.html" class="swiper-slide" target="_blank"> <div class="img-box"> <img src="http://www.mobiletrain.org//tywzt/ty33.jpg" alt="" /> </div> <div> <div class="h3">如何实现服务器负载均衡</div> <p>2023-12-06</p> </div> </a> <a href="http://www.mobiletrain.org/about/BBS/258997.html" class="swiper-slide" target="_blank"> <div class="img-box"> <img src="http://www.mobiletrain.org//tywzt/tongyong12.jpg" alt="" /> </div> <div> <div class="h3">linux有哪些优势和劣势</div> <p>2023-12-06</p> </div> </a> <a href="http://www.mobiletrain.org/about/BBS/258996.html" class="swiper-slide" target="_blank"> <div class="img-box"> <img src="http://www.mobiletrain.org//tywzt/ty64.jpg" alt="" /> </div> <div> <div class="h3">linux需要驱动吗</div> <p>2023-12-06</p> </div> </a> <a href="http://www.mobiletrain.org/about/BBS/258995.html" class="swiper-slide" target="_blank"> <div class="img-box"> <img src="http://www.mobiletrain.org//tywzt/tongyong7.jpg" alt="" /> </div> <div> <div class="h3">android与linux的区别</div> <p>2023-12-06</p> </div> </a> <a href="http://www.mobiletrain.org/about/BBS/258994.html" class="swiper-slide" target="_blank"> <div class="img-box"> <img src="http://www.mobiletrain.org//tywzt/ty64.jpg" alt="" /> </div> <div> <div class="h3">如何搭建基于容器的深度学习环境</div> <p>2023-12-06</p> </div> </a> </div> </div> <!-- 职场就业 --> <div class="con-right-rywd"> <div class="tk-tit h3"> <a class="left" href="http://www.mobiletrain.org/zcjy/" target="_blank"><i class="ypfont yp-minzhengtubiao1-46" ></i>职场就业</a> <a href="http://www.mobiletrain.org/zcjy/" target="_blank">更多>></a> </div> <div class="swiper2 "> <a href="http://www.mobiletrain.org/zcjy/wlaq/259025.html" class="swiper-slide zcjy" target="_blank"> <div class="img-box"> <img src="http://www.mobiletrain.org//tywzt/ty41.jpg" alt="" /> </div> <div> <div class="h3">网络安全软件开发的就业前景</div> <p>2023-12-09</p> </div> </a> <a href="http://www.mobiletrain.org/zcjy/python/259024.html" class="swiper-slide zcjy" target="_blank"> <div class="img-box"> <img src="http://www.mobiletrain.org//tywzt/tongyong6.jpg" alt="" /> </div> <div> <div class="h3">学会python工程师后的就业前景</div> <p>2023-12-09</p> </div> </a> <a href="http://www.mobiletrain.org/zcjy/java/259023.html" class="swiper-slide zcjy" target="_blank"> <div class="img-box"> <img src="http://www.mobiletrain.org//tywzt/tongyong2.jpg" alt="" /> </div> <div> <div class="h3">学会java工程师后的就业前景</div> <p>2023-12-09</p> </div> </a> <a href="http://www.mobiletrain.org/zcjy/linux/136992.html" class="swiper-slide zcjy" target="_blank"> <div class="img-box"> <img src="http://www.mobiletrain.org//2023/0428/1682660765277.png" alt="" /> </div> <div> <div class="h3">云计算技术就业前景以及发展方向怎样?</div> <p>2023-08-07</p> </div> </a> </div> </div> <!-- 快速通道 --> <div class="con-right-rywd"> <div class="rywd-tit h3"> <i class="ypfont yp-weinituijian"></i>快速通道 </div> <ul class="kstd"> <li> <div class="h3">培训机构</div> <a href="http://www.mobiletrain.org/training/" target="_blank">了解培训相关</a> </li> <li> <div class="h3">就业前景</div> <a href="http://www.mobiletrain.org/zcjy/" target="_blank">查看就业前景</a> </li> <li> <div class="h3">培训门槛</div> <a href="http://www.mobiletrain.org/ljc/" target="_blank">了解学习门槛</a> </li> <li> <div class="h3">应聘面试</div> <a href="http://www.mobiletrain.org/interview/" target="_blank">常见面试考题</a> </li> <li> <div class="h3">就业服务</div> <a href="http://www.mobiletrain.org/employ/" target="_blank" rel="nofollow">毕业推荐就业</a> </li> <li> <div class="h3">师资团队</div> <a href="http://www.mobiletrain.org/teachers/" target="_blank" rel="nofollow">了解师资团队</a> </li> </ul> </div> </div> </div> </div> </div> </div> <link rel="stylesheet" href="/css/css3451.css"> <div class="edu-footer"> <div class="base"> <div class="con-left"> <img src="http://www.mobiletrain.org/images_index/new-logo-white.png" class="edu-footer-logo" /> <p class="edu-footer-sologan">初心至善  匠心育人</p> <p class="edu-footer-phoneNumber"> <i class="icon icon-dianhua1"></i>400-811-9990 <a href="javascript:;" onclick="open53_pc()" rel="nofollow">24小时在线咨询</a> </p> </div> <div class="con-right"> <div class="edu-footer-about-links"> <div class="list1 list"> <div class="h4">关于千锋</div> <ul> <li> <a href="http://www.mobiletrain.org/about/" target="_blank" rel="nofollow">千锋简介</a> </li> <li> <a href="http://www.mobiletrain.org/about/contact.html" target="_blank" rel="nofollow">联系我们</a> </li> <li> <a href="http://www.mobiletrain.org/qynx/" target="_blank" rel="nofollow">企业服务</a> </li> <li> <a href="http://www.mobiletrain.org/topic/fygy.html" target="_blank" rel="nofollow">锋益公益</a> </li> </ul> </div> <div class="list1 list"> <div class="h4">学习资源</div> <ul> <li> <a href="http://prj.qfedu.com/" target="_blank" rel="nofollow">项目库</a> </li> <li> <a href="http://www.mobiletrain.org/open/" target="_blank" rel="nofollow">公开课</a> </li> <li> <a href="http://video.mobiletrain.org/" target="_blank" rel="nofollow">视频教程</a> </li> <!-- <li> <a href="http://www.mobiletrain.org/book/index.html?type=1" target="_blank" rel="nofollow">原创丛书</a> </li> --> </ul> </div> <div class="list1 list"> <div class="h4">服务指南</div> <ul> <li> <a href="javascript:;" onclick="open53_pc()" rel="nofollow">报名咨询</a> </li> <li> <a href="javascript:;" onclick="open53_pc()" rel="nofollow">校区分布</a> </li> <li> <a href="http://www.mobiletrain.org/sitemap.html" target="_blank" rel="nofollow">网站地图</a> </li> <li> <a href="http://www.mobiletrain.org/privacyPolicy.html" target="_blank" rel="nofollow">隐私声明</a> </li> </ul> </div> </div> <div class="qrcode-box"> <div class="qrcode flex-center"> <img src="/wzt/qr-code-new.png" alt="千锋教育" /> </div> <div class="h4">千锋学习站 | <span>随时随地免费学</span></div> </div> <div class="qrcode-box"> <div class="qrcode flex-center"> <img src="http://www.mobiletrain.org/images_index/qr-code-new2.png" alt="千锋教育" /> </div> <div class="h4">扫一扫进入千锋手机站</div> </div> </div> </div> </div> <div class="footer-link"> <div class="base"> <div class="links-tab"> <span class="active">热门课程</span> <!-- <span>热点话题</span> --> <!-- <span>学习线路图</span> --> <!-- <span>千锋全国</span> --> </div> <div class="links-a active"> <!-- 编辑配置cms --> <a href="http://www.mobiletrain.org/" target="_blank">IT培训</a> <a href="http://java.mobiletrain.org/" target="_blank">java培训</a> <a href="http://www.mobiletrain.org/special/harmonyos.html" target="_blank">鸿蒙开发培训</a> <a href="http://www.mobiletrain.org/special/emb.html" target="_blank">嵌入式培训</a> <a href="http://www.mobiletrain.org/special/python.html" target="_blank">python培训</a> <a href="http://www.mobiletrain.org/special/ui.html" target="_blank">UI培训</a> <a href="http://www.mobiletrain.org/special/test.html" target="_blank">软件测试培训</a> <a href="http://www.mobiletrain.org/special/linux.html" target="_blank">云计算培训</a> <a href="http://www.mobiletrain.org/special/bigdata.html" target="_blank">大数据培训</a> <a href="http://www.mobiletrain.org/special/wlw.html" target="_blank">物联网培训</a> <a href="http://www.mobiletrain.org/special/wlw.html" target="_blank">游戏开发培训</a> <a href="http://www.mobiletrain.org/special/qmt.html" target="_blank">全媒体运营培训</a> <a href="http://www.mobiletrain.org/special/ysjj.html" target="_blank">影视剪辑培训</a> <a href="http://www.mobiletrain.org/special/wlaq.html" target="_blank">网络安全培训</a> </div> <!-- <div class="links-a"> --> <!-- 编辑配置cms3490 --> <!-- </div> --> <!-- <div class="links-a"> 编辑配置cms 3442 </div> --> <!-- <div class="links-a"> --> <!-- 编辑配置cms3443 --> <!-- </div> --> </div> <div class="copyright"> <p class="copyright-p"> Copyright 2011-2025 <a href="javascript:;" rel="nofollow" title="千锋互联">北京千锋互联科技有限公司</a> <a href="https://beian.miit.gov.cn/" rel="nofollow"> 京ICP备12003911号-3 </a> <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010802035719" rel="nofollow" style="display: inline-block;text-decoration: none;height: 20px;line-height: 20px;"> <img src="/wzt/beian.png" />京公网安备 11010802030320号 </a> </p> <p>千锋教育 运营主体:北京千锋互联科技有限公司,属具备计算机技术培训资质的教育培训机构。</p> </div> </div> <script src="http://www.mobiletrain.org/js/jquery.min.js"></script> <script src="http://www.mobiletrain.org/js/swiper4.5.0.min.js"></script> <script src="http://www.mobiletrain.org/js/common1.js?111"></script> <script src="/js/highlight.min.js"></script> <script> hljs.highlightAll(); var str = $(".content-con .con-left").html() + "" var newstr = str.replace(new RegExp("_x000D_", "gm"), ""); $(".content-con .con-left").html(newstr); if (location.href.indexOf("/about/BBS/") > -1) { $(".nav_right_bg .nav").eq(10).removeClass("topicactive") $(".nav_right_bg .nav").eq(9).addClass("topicactive") } if (location.href.indexOf("/about/info/") > -1) { $(".nav_right_bg .nav").eq(10).removeClass("topicactive") $(".nav_right_bg .nav").eq(8).addClass("topicactive") } $(document).ready(function () { var href = $("#tag_click").attr("href"); if (href && href.indexOf("-0-") != -1) { var tag_code = $("#tag_click").html(); $.ajax({ url: "http://app.mobiletrain.org/tags.php", type: "get", dataType: "json", data: { tag_code: tag_code }, success: function (data) { $("#tag_click").attr( "href", "http://www.mobiletrain.org/tag-" + data + "-1.html" ); }, }); } }); new Swiper(".swiper1", { loop: true, autoplay: true, pagination: { el: ".swiper-pagination1", }, }); new Swiper(".swiper-news", { autoplay: true, loop: true, direction: "vertical", }); $(".footer-link .links-tab span").click(function () { $(this).addClass("active").siblings().removeClass("active"); $(".footer-link .links-a").removeClass("active"); $(".footer-link .links-a").eq($(this).index()).addClass("active"); }); // 开班信息模块 function kbxx () { // var courseId = // arguments.length > 0 && arguments[0] !== undefined // ? arguments[0] // : 13; var cityId = arguments[0] !== undefined ? arguments[0] : 10; $.ajax({ url: "https://owzsapi.qfedu.com/v1/api/openApiRestController/getAllClass?type=1", type: "GET", success: function success (res) { var r = ""; var curTime = new Date().getTime(); var filterArr = res.data.filter(function (v) { return v.cityId == cityId; }); console.log(filterArr); filterArr.reverse().forEach(function (v, idx) { // 最大条数 if (idx > 14) return; // 判断时间 var timeMode = "预约占座"; var kbTime = new Date(v.beginTime).getTime(); // 一个月 if (kbTime - curTime > 2592000000) { timeMode = "预约占座"; } if (kbTime - curTime > 0 && kbTime - curTime < 2642268030) { timeMode = "即将报满"; } if (kbTime - curTime < 0) { timeMode = "爆满开班"; } r += "<li class='swiper-slide'>\n <a href='javascript:;' rel='nofollow' onclick='open53_pc()'>\n <span>" + (v.name.replace(v.cityName, "").split("班")[0] + "班") + "</span>\n <span>" + v.beginTime + "</span>\n <span data-mode='" + (timeMode === "即将报满" ? 0 : timeMode === "爆满开班" ? 2 : 1) + "'>" + timeMode + " " + (timeMode === "即将报满" ? "" : "") + "</span>\n </a>\n </li>"; }); $(".des-right-classes .swiper-wrapper").html(r); new Swiper(".swiper6", { slidesPerView: 5, slidesPerGroup: 5, spaceBetween: 10, loop: true, autoplay: true, direction: "vertical", }); }, }); } kbxx(10); $(".kbxx_showXq_btn").click(function () { $(".kbxx_showXq_box").css("display", "block"); }); $(".kbxx_showXq_box ul li").click(function () { kbxx($(this).data("cityid")); $(".choose-xq").html($(this).context.innerText); $(".kbxx_showXq_box").css("display", "none"); }); if ( $(".content-left-box-child").height() > $(".content-right-box-child").height() ) { $(".content-right-box-child").addClass("sticky"); } else if ( $(".content-left-box-child").height() < $(".content-right-box-child").height() ) { $(".content-left-box-child").addClass("sticky"); } </script> </body> </html>