学习强国爬虫 搜索+文章内容

This commit is contained in:
2025-11-21 11:49:41 +08:00
parent 97da821799
commit 0e7cee3070
41 changed files with 14904 additions and 79 deletions

View File

@@ -0,0 +1,223 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 22,
"id": "948be230",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"项目根目录: f:\\Project\\schoolNews\n",
"✓ 已启用自动重载模块功能 - 修改 .py 文件后会自动生效\n"
]
}
],
"source": [
"# 自动重载模块(当文件修改后自动刷新)\n",
"%reload_ext autoreload\n",
"%autoreload 2\n",
"\n",
"import sys\n",
"import os\n",
"\n",
"# 先添加项目根目录到路径(必须在导入之前)\n",
"project_root = os.path.abspath(os.path.join(os.getcwd(), '..'))\n",
"if project_root not in sys.path:\n",
" sys.path.insert(0, project_root)\n",
"\n",
"# 然后再导入模块\n",
"from crawler.xxqg.XxqgCrawler import XxqgCrawler\n",
"from crawler.BaseCrawler import NewsItem\n",
"from loguru import logger\n",
"import json\n",
"from pprint import pprint\n",
"\n",
"print(f\"项目根目录: {project_root}\")\n",
"print(\"✓ 已启用自动重载模块功能 - 修改 .py 文件后会自动生效\")\n"
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "31a8a0dd",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m2025-11-21 11:46:12.368\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mcrawler.BaseCrawler\u001b[0m:\u001b[36m__init__\u001b[0m:\u001b[36m72\u001b[0m - \u001b[1m初始化爬虫: XxqgCrawler\u001b[0m\n",
"\u001b[32m2025-11-21 11:46:13.413\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mcrawler.xxqg.XxqgCrawler\u001b[0m:\u001b[36m_init_driver\u001b[0m:\u001b[36m119\u001b[0m - \u001b[1mChrome浏览器初始化成功\u001b[0m\n",
"\u001b[32m2025-11-21 11:46:13.413\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mcrawler.xxqg.XxqgCrawler\u001b[0m:\u001b[36m_init_driver\u001b[0m:\u001b[36m128\u001b[0m - \u001b[1m访问主页获取初始Cookie\u001b[0m\n"
]
}
],
"source": [
"crawler = XxqgCrawler()"
]
},
{
"cell_type": "code",
"execution_count": 25,
"id": "afca4191",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m2025-11-21 11:48:19.413\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mcrawler.xxqg.XxqgCrawler\u001b[0m:\u001b[36msearch\u001b[0m:\u001b[36m268\u001b[0m - \u001b[1m访问搜索页面并手动点击搜索\u001b[0m\n",
"\u001b[32m2025-11-21 11:48:22.988\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mcrawler.xxqg.XxqgCrawler\u001b[0m:\u001b[36msearch\u001b[0m:\u001b[36m273\u001b[0m - \u001b[1m<selenium.webdriver.remote.webelement.WebElement (session=\"e9cb78c65ab607f72ead921b77daa63e\", element=\"f.A4561956ABC35C3E0609958DE7693C5E.d.D6A7A659A5178F4B104A1069F7A2AA3A.e.99\")>\u001b[0m\n",
"\u001b[32m2025-11-21 11:48:25.405\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mcrawler.xxqg.XxqgCrawler\u001b[0m:\u001b[36mget_search_url\u001b[0m:\u001b[36m262\u001b[0m - \u001b[1m本页提取到 13 条搜索结果\u001b[0m\n",
"\u001b[32m2025-11-21 11:48:25.405\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mcrawler.xxqg.XxqgCrawler\u001b[0m:\u001b[36msearch\u001b[0m:\u001b[36m312\u001b[0m - \u001b[1m共提取 3 条URL\u001b[0m\n",
"\u001b[32m2025-11-21 11:48:35.821\u001b[0m | \u001b[33m\u001b[1mWARNING \u001b[0m | \u001b[36mcrawler.xxqg.XxqgCrawler\u001b[0m:\u001b[36mparse_news_detail\u001b[0m:\u001b[36m348\u001b[0m - \u001b[33m\u001b[1m访问文章页失败或未找到文章区域: https://www.xuexi.cn/lgpage/detail/index.html?id=18044198242183277818&amp;item_id=18044198242183277818, Message: \n",
"Stacktrace:\n",
"Symbols not available. Dumping unresolved backtrace:\n",
"\t0x7ff75a08a235\n",
"\t0x7ff759de2630\n",
"\t0x7ff759b716dd\n",
"\t0x7ff759bca27e\n",
"\t0x7ff759bca58c\n",
"\t0x7ff759c1ed77\n",
"\t0x7ff759c1baba\n",
"\t0x7ff759bbb0ed\n",
"\t0x7ff759bbbf63\n",
"\t0x7ff75a0b5d60\n",
"\t0x7ff75a0afe8a\n",
"\t0x7ff75a0d1005\n",
"\t0x7ff759dfd71e\n",
"\t0x7ff759e04e1f\n",
"\t0x7ff759deb7c4\n",
"\t0x7ff759deb97f\n",
"\t0x7ff759dd18e8\n",
"\t0x7ffb85a47374\n",
"\t0x7ffb8797cc91\n",
"\u001b[0m\n",
"\u001b[32m2025-11-21 11:48:46.085\u001b[0m | \u001b[33m\u001b[1mWARNING \u001b[0m | \u001b[36mcrawler.xxqg.XxqgCrawler\u001b[0m:\u001b[36mparse_news_detail\u001b[0m:\u001b[36m348\u001b[0m - \u001b[33m\u001b[1m访问文章页失败或未找到文章区域: https://www.xuexi.cn/lgpage/detail/index.html?id=5133206409192666185&amp;item_id=5133206409192666185, Message: \n",
"Stacktrace:\n",
"Symbols not available. Dumping unresolved backtrace:\n",
"\t0x7ff75a08a235\n",
"\t0x7ff759de2630\n",
"\t0x7ff759b716dd\n",
"\t0x7ff759bca27e\n",
"\t0x7ff759bca58c\n",
"\t0x7ff759c1ed77\n",
"\t0x7ff759c1baba\n",
"\t0x7ff759bbb0ed\n",
"\t0x7ff759bbbf63\n",
"\t0x7ff75a0b5d60\n",
"\t0x7ff75a0afe8a\n",
"\t0x7ff75a0d1005\n",
"\t0x7ff759dfd71e\n",
"\t0x7ff759e04e1f\n",
"\t0x7ff759deb7c4\n",
"\t0x7ff759deb97f\n",
"\t0x7ff759dd18e8\n",
"\t0x7ffb85a47374\n",
"\t0x7ffb8797cc91\n",
"\u001b[0m\n",
"\u001b[32m2025-11-21 11:48:46.780\u001b[0m | \u001b[33m\u001b[1mWARNING \u001b[0m | \u001b[36mcrawler.xxqg.XxqgCrawler\u001b[0m:\u001b[36mparse_news_detail\u001b[0m:\u001b[36m362\u001b[0m - \u001b[33m\u001b[1m提取发布时间失败: Message: no such element: Unable to locate element: {\"method\":\"css selector\",\"selector\":\"div.render-detail-time\"}\n",
" (Session info: chrome=142.0.7444.163); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#nosuchelementexception\n",
"Stacktrace:\n",
"Symbols not available. Dumping unresolved backtrace:\n",
"\t0x7ff75a08a235\n",
"\t0x7ff759de2630\n",
"\t0x7ff759b716dd\n",
"\t0x7ff759bca27e\n",
"\t0x7ff759bca58c\n",
"\t0x7ff759bbcd7c\n",
"\t0x7ff759bbcc36\n",
"\t0x7ff759c1baba\n",
"\t0x7ff759bbb0ed\n",
"\t0x7ff759bbbf63\n",
"\t0x7ff75a0b5d60\n",
"\t0x7ff75a0afe8a\n",
"\t0x7ff75a0d1005\n",
"\t0x7ff759dfd71e\n",
"\t0x7ff759e04e1f\n",
"\t0x7ff759deb7c4\n",
"\t0x7ff759deb97f\n",
"\t0x7ff759dd18e8\n",
"\t0x7ffb85a47374\n",
"\t0x7ffb8797cc91\n",
"\u001b[0m\n",
"\u001b[32m2025-11-21 11:48:46.786\u001b[0m | \u001b[33m\u001b[1mWARNING \u001b[0m | \u001b[36mcrawler.xxqg.XxqgCrawler\u001b[0m:\u001b[36mparse_news_detail\u001b[0m:\u001b[36m368\u001b[0m - \u001b[33m\u001b[1m提取来源失败: Message: no such element: Unable to locate element: {\"method\":\"css selector\",\"selector\":\"div.render-detail-source\"}\n",
" (Session info: chrome=142.0.7444.163); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#nosuchelementexception\n",
"Stacktrace:\n",
"Symbols not available. Dumping unresolved backtrace:\n",
"\t0x7ff75a08a235\n",
"\t0x7ff759de2630\n",
"\t0x7ff759b716dd\n",
"\t0x7ff759bca27e\n",
"\t0x7ff759bca58c\n",
"\t0x7ff759bbcd7c\n",
"\t0x7ff759bbcc36\n",
"\t0x7ff759c1baba\n",
"\t0x7ff759bbb0ed\n",
"\t0x7ff759bbbf63\n",
"\t0x7ff75a0b5d60\n",
"\t0x7ff75a0afe8a\n",
"\t0x7ff75a0d1005\n",
"\t0x7ff759dfd71e\n",
"\t0x7ff759e04e1f\n",
"\t0x7ff759deb7c4\n",
"\t0x7ff759deb97f\n",
"\t0x7ff759dd18e8\n",
"\t0x7ffb85a47374\n",
"\t0x7ffb8797cc91\n",
"\u001b[0m\n",
"\u001b[32m2025-11-21 11:48:46.809\u001b[0m | \u001b[34m\u001b[1mDEBUG \u001b[0m | \u001b[36mcrawler.xxqg.XxqgCrawler\u001b[0m:\u001b[36mget_content_rows\u001b[0m:\u001b[36m445\u001b[0m - \u001b[34m\u001b[1m提取文字: 10月28日上午10时由中国海军戚继光舰、沂蒙山舰组成的海军83舰编队抵达新加坡樟宜港正式开启对...\u001b[0m\n",
"\u001b[32m2025-11-21 11:48:46.817\u001b[0m | \u001b[34m\u001b[1mDEBUG \u001b[0m | \u001b[36mcrawler.xxqg.XxqgCrawler\u001b[0m:\u001b[36mget_content_rows\u001b[0m:\u001b[36m445\u001b[0m - \u001b[34m\u001b[1m提取文字: 中国驻新加坡大使曹忠明、使馆领导及工作人员、当地留学生代表以及新加坡海军官兵代表到码头举行欢迎仪式,...\u001b[0m\n",
"\u001b[32m2025-11-21 11:48:46.829\u001b[0m | \u001b[34m\u001b[1mDEBUG \u001b[0m | \u001b[36mcrawler.xxqg.XxqgCrawler\u001b[0m:\u001b[36mget_content_rows\u001b[0m:\u001b[36m445\u001b[0m - \u001b[34m\u001b[1m提取文字: 此次到访新加坡海军83舰编队将进行为期4天的友好访问编队任务官兵将参观新加坡海军军事设施及海军博...\u001b[0m\n",
"\u001b[32m2025-11-21 11:48:46.841\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mcrawler.xxqg.XxqgCrawler\u001b[0m:\u001b[36mparse_news_detail\u001b[0m:\u001b[36m455\u001b[0m - \u001b[1m解析文章详情完成: {'title': '中国海军83舰编队对新加坡进行友好访问', 'contentRows': [{'type': 'text', 'content': '10月28日上午10时由中国海军戚继光舰、沂蒙山舰组成的海军83舰编队抵达新加坡樟宜港正式开启对新加坡的友好访问。'}, {'type': 'text', 'content': '中国驻新加坡大使曹忠明、使馆领导及工作人员、当地留学生代表以及新加坡海军官兵代表到码头举行欢迎仪式,共同迎接编队的到来。'}, {'type': 'text', 'content': '此次到访新加坡海军83舰编队将进行为期4天的友好访问编队任务官兵将参观新加坡海军军事设施及海军博物馆。中新两国海军将开展务实高效的军事交流并计划互派官兵登舰参观。靠泊期间戚继光舰还将举行甲板招待会。总台报道员 海月 通讯员 李大公)'}], 'url': 'https://www.xuexi.cn/lgpage/detail/index.html?id=16022165268290507477&amp;item_id=16022165268290507477', 'viewCount': None, 'publishTime': None, 'author': None, 'source': None, 'category': None, 'executeStatus': 0, 'executeMessage': None}\u001b[0m\n"
]
},
{
"data": {
"text/plain": [
"ResultDomain(code=0, message='', success=True, data=None, dataList=[NewsItem(title='https://www.xuexi.cn/lgpage/detail/index.html?id=18044198242183277818&amp;item_id=18044198242183277818', contentRows=[], url='https://www.xuexi.cn/lgpage/detail/index.html?id=18044198242183277818&amp;item_id=18044198242183277818', viewCount=None, publishTime='2025-11-10', author=None, source='央视军事', category=None, executeStatus=0, executeMessage=None), NewsItem(title='https://www.xuexi.cn/lgpage/detail/index.html?id=5133206409192666185&amp;item_id=5133206409192666185', contentRows=[], url='https://www.xuexi.cn/lgpage/detail/index.html?id=5133206409192666185&amp;item_id=5133206409192666185', viewCount=None, publishTime='2025-10-29', author=None, source='央视军事', category=None, executeStatus=0, executeMessage=None), NewsItem(title='中国海军83舰编队对新加坡进行友好访问', contentRows=[{'type': 'text', 'content': '10月28日上午10时由中国海军戚继光舰、沂蒙山舰组成的海军83舰编队抵达新加坡樟宜港正式开启对新加坡的友好访问。'}, {'type': 'text', 'content': '中国驻新加坡大使曹忠明、使馆领导及工作人员、当地留学生代表以及新加坡海军官兵代表到码头举行欢迎仪式,共同迎接编队的到来。'}, {'type': 'text', 'content': '此次到访新加坡海军83舰编队将进行为期4天的友好访问编队任务官兵将参观新加坡海军军事设施及海军博物馆。中新两国海军将开展务实高效的军事交流并计划互派官兵登舰参观。靠泊期间戚继光舰还将举行甲板招待会。总台报道员 海月 通讯员 李大公)'}], url='https://www.xuexi.cn/lgpage/detail/index.html?id=16022165268290507477&amp;item_id=16022165268290507477', viewCount=None, publishTime='2025-10-28', author=None, source='中央广播电视总台', category=None, executeStatus=0, executeMessage=None)])"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"crawler.search(\"新加坡\", total=3)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7fac804d",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "schoolNewsCrawler",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

View File

@@ -11,6 +11,7 @@ import json
class UrlConfig(BaseModel):
"""URL配置数据模型"""
url: str = Field(..., description="请求URL")
apiurl: Optional[str] = Field(default=None, description="API请求URL")
params: Optional[Dict[str, Any]] = Field(default=None, description="请求参数")
method: str = Field(default="GET", description="请求方法")
headers: Optional[Dict[str, str]] = Field(default=None, description="请求头")

View File

@@ -20,7 +20,7 @@ from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.chrome.service import Service
import platform
import time
import random
import os
@@ -126,7 +126,12 @@ class XhwCrawler(BaseCrawler):
chrome_options.add_argument('--disable-web-security')
chrome_options.add_argument('--allow-running-insecure-content')
chrome_options.add_argument('--disable-features=VizDisplayCompositor')
service = Service(executable_path=r"chromedriver.exe")
chrome_driver_path = 'win/chromedriver.exe'
if platform.system() == 'Linux':
chrome_driver_path = 'linux/chromedriver'
service = Service(executable_path=chrome_driver_path)
driver = None
try:

View File

@@ -0,0 +1,456 @@
# 新华网爬虫
from itertools import count
from typing import List, Optional
from bs4 import Tag
from pydantic import InstanceOf
from sqlalchemy import false
from core.ResultDomain import ResultDomain
from crawler.BaseCrawler import BaseCrawler, CrawlerConfig, NewsItem, UrlConfig
from loguru import logger
import re
import chardet
from datetime import datetime, timedelta
from bs4.element import NavigableString
from urllib.parse import urlparse, urlencode, urlunparse
import json
from seleniumwire import webdriver # 注意不是 selenium
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.chrome.service import Service
import platform
from urllib.parse import urlparse, parse_qs
import time
import random
import os
class XxqgCrawler(BaseCrawler):
def __init__(self):
"""初始化学习强国爬虫"""
config = CrawlerConfig(
base_url="https://www.xuexi.cn/",
urls={
"search": UrlConfig(
url="https://static.xuexi.cn/search/online/index.html",
apiurl="https://search.xuexi.cn/api/search",
method="GET",
params={
"query": ""
},
headers={
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8',
'Accept-Encoding': 'gzip, deflate, br',
'Connection': 'keep-alive',
'Upgrade-Insecure-Requests': '1',
'Sec-Fetch-Dest': 'document',
'Sec-Fetch-Mode': 'navigate',
'Sec-Fetch-Site': 'none',
'Cache-Control': 'max-age=0',
'Referer': 'https://www.xuexi.cn/',
'sec-ch-ua': '"Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"'
}
),
"important": UrlConfig(
url="https://www.xuexi.cn/98d5ae483720f701144e4dabf99a4a34/5957f69bffab66811b99940516ec8784.html",
method="GET",
params={},
headers={
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8',
'Accept-Encoding': 'gzip, deflate, br',
'Connection': 'keep-alive',
'Upgrade-Insecure-Requests': '1',
'Sec-Fetch-Dest': 'document',
'Sec-Fetch-Mode': 'navigate',
'Sec-Fetch-Site': 'none',
'Cache-Control': 'max-age=0',
'Referer': 'https://www.xuexi.cn/',
'sec-ch-ua': '"Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"'
}
)
},
)
super().__init__(config)
# 初始化时创建driver
self.driver = self._init_driver()
def _init_driver(self):
"""初始化并返回Chrome WebDriver实例"""
chrome_options = Options()
# 确保浏览器可见,不使用无头模式
# 或者完全删除这行,因为默认就是有界面模式
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
chrome_options.add_argument('--disable-blink-features=AutomationControlled')
chrome_options.add_experimental_option("excludeSwitches", ["enable-automation"])
chrome_options.add_experimental_option('useAutomationExtension', False)
chrome_options.add_argument('--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36')
# 确保浏览器可见
chrome_options.add_argument('--start-maximized')
chrome_options.add_argument('--disable-gpu')
chrome_options.add_argument('--disable-web-security')
chrome_options.add_argument('--allow-running-insecure-content')
chrome_options.add_argument('--disable-features=VizDisplayCompositor')
# 判断系统类型获取对应的chromedriver路径
chrome_driver_path = 'win/chromedriver.exe'
if platform.system() == 'Linux':
chrome_driver_path = 'linux/chromedriver'
service = Service(executable_path=chrome_driver_path)
driver = None
try:
driver = webdriver.Chrome(service=service, options=chrome_options)
logger.info("Chrome浏览器初始化成功")
except Exception as e:
logger.error(f"Chrome浏览器初始化失败: {str(e)}")
return driver
# 设置隐式等待时间
# driver.implicitly_wait(10)
# 访问主页获取初始Cookie
logger.info("访问主页获取初始Cookie")
try:
driver.get(self.config.base_url)
except Exception as e:
logger.error(f"访问URL失败: {self.config.base_url}, 错误: {str(e)}")
return driver
time.sleep(random.uniform(2, 4))
# 检查是否有验证页面
page_source = driver.page_source
if "验证" in page_source or "captcha" in page_source.lower() or "滑动验证" in page_source:
logger.warning("检测到验证页面,尝试手动处理验证")
# 尝试等待用户手动处理验证
logger.info("请在30秒内手动完成验证...")
time.sleep(30)
# 刷新页面,检查验证是否完成
driver.refresh()
time.sleep(random.uniform(2, 4))
# 再次检查验证状态
page_source = driver.page_source
if "验证" in page_source or "captcha" in page_source.lower() or "滑动验证" in page_source:
logger.error("验证未完成,无法继续爬取")
# self.driver.quit()
# self.driver = None
return driver
return driver
def _normalize_url(self, url: str) -> str:
"""
规范化 URL补全协议和域名
Args:
url: 原始 URL
Returns:
完整的 URL
"""
if not url:
return url
# 已经是完整 URL
if url.startswith("http://") or url.startswith("https://"):
return url
# 协议相对 URL补充 https:
if url.startswith("//"):
return "https:" + url
# 相对路径,补全域名
return self.config.base_url + url
def search(self, keyword, total=10) -> ResultDomain:
"""搜索新闻"""
search_config = self.config.urls.get("search")
if not self.driver:
logger.error("WebDriver未初始化无法继续爬取")
return ResultDomain(code=1, message="WebDriver未初始化无法继续爬取", success=False)
count = 0
url_base_map = {}
url_list = []
news_list = []
resultDomain = ResultDomain(code=0, message="", success=True, dataList=news_list)
def get_search_url():
"""从当前页面提取URL数据"""
nonlocal count
try:
# 等待页面加载完成
# assert self.driver is not None, "WebDriver未初始化"
if self.driver is None:
logger.error("WebDriver未初始化")
return
wait = WebDriverWait(self.driver, 10)
wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, "div.search-result")))
wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, "div.c-card:not(.c-sc)")))
# 解析HTML搜索结果
home = self.driver.find_element(By.CSS_SELECTOR, "div.home")
search_content = home.find_element(By.CSS_SELECTOR, "div.search-content")
search_result_div = search_content.find_element(By.CSS_SELECTOR, "div.search-result")
item_s = search_result_div.find_elements(By.CSS_SELECTOR, "div.c-card:not(.c-sc)")
for item in item_s:
if count >= total:
break
try:
# 从 a 标签获取 URL
link = item.find_element(By.CSS_SELECTOR, "a[href]")
url = link.get_attribute("href")
# 从 h3 > span.title 获取标题
title = item.find_element(By.CSS_SELECTOR, "h3 span.title").text
# 从 div.time 获取来源和时间
time_element = item.find_element(By.CSS_SELECTOR, "div.time")
time_text = time_element.text.strip()
# 判断是换行符分隔还是空格分隔
if '\n' in time_text:
time_lines = time_text.split('\n')
source = time_lines[0].strip() if len(time_lines) > 0 else ''
publish_time = time_lines[1].strip() if len(time_lines) > 1 else ''
else:
# 空格分隔,使用正则提取日期格式
date_match = re.search(r'\d{4}-\d{2}-\d{2}', time_text)
if date_match:
publish_time = date_match.group()
source = time_text[:date_match.start()].strip()
else:
source = ''
publish_time = time_text
url_base_map[url] = {
'title': title,
'source': source,
'publishTime': publish_time
}
url_list.append(url)
count += 1
except Exception as e:
logger.warning(f"解析某个搜索结果失败: {str(e)}")
continue
logger.info(f"本页提取到 {len(item_s)} 条搜索结果")
except Exception as e:
logger.exception(f"提取URL过程出错: {str(e)}")
# 方式1初次手动点击按钮进入
logger.info("访问搜索页面并手动点击搜索")
self.driver.get(search_config.url)
time.sleep(2)
home = self.driver.find_element(By.CSS_SELECTOR, "div.home")
logger.info(home)
input_wapper_div = self.driver.find_element(By.CSS_SELECTOR, 'div.search-input-wrapper')
input_div = input_wapper_div.find_element(By.CSS_SELECTOR, 'input.search-type-input-compact')
input_div.send_keys(keyword)
search_btn = input_wapper_div.find_element(By.CSS_SELECTOR, 'button[type="submit"]')
search_btn.click()
time.sleep(2)
# 提取第一页数据
get_search_url()
# 方式2后续页直接通过URL进入
while count < total:
# 记录提取前的数量
count_before = count
# 构建下一页URL
current_url = self.driver.current_url
qs = urlparse(current_url)
param = parse_qs(qs.query)
current_page = int(param.get('page', ['1'])[0])
param['page'] = [str(current_page + 1)]
new_url = urlunparse((qs.scheme, qs.netloc, qs.path, qs.params, urlencode(param, doseq=True), qs.fragment))
logger.info(f"翻页到第 {current_page + 1}")
# 直接访问新页面
self.driver.get(new_url)
time.sleep(2)
# 提取数据
get_search_url()
# 如果本页没有提取到新数据,说明没有更多结果
if count == count_before:
logger.info("本页没有提取到新数据,结束翻页")
break
logger.info(f"共提取 {len(url_list)} 条URL")
# 解析文章详情
for url in url_list:
try:
news_item = self.parse_news_detail(url)
if news_item:
# 如果某些为空根据url_base_map补齐
if news_item.title is None or news_item.title.strip() == "":
news_item.title = url_base_map[url].get("title", "")
if news_item.publishTime is None or news_item.publishTime.strip() == "":
news_item.publishTime = url_base_map[url].get("publishTime", "")
if news_item.source is None or news_item.source.strip() == "":
news_item.source = url_base_map[url].get("source", "")
news_list.append(news_item)
except Exception as e:
logger.warning(f"解析文章详情失败: {str(e)}")
continue
resultDomain.dataList = news_list
with open("Xxqg_news_list.json", "w", encoding="utf-8") as f:
json.dump([item.model_dump() for item in resultDomain.dataList] if resultDomain.dataList else [], f, ensure_ascii=False, indent=4)
return resultDomain
def parse_news_detail(self, url: str) -> NewsItem:
news_item = NewsItem(title='', contentRows=[], url=url)
if self.driver is None:
return news_item
try:
self.driver.get(url)
article_area_div = WebDriverWait(self.driver, 10).until(
EC.presence_of_element_located((By.CSS_SELECTOR, 'div.render-detail-article'))
)
except Exception as e:
logger.warning(f"访问文章页失败或未找到文章区域: {url}, {e}")
return news_item
# 基础信息获取
try:
title_div = article_area_div.find_element(By.CSS_SELECTOR, "div.render-detail-title")
news_item.title = title_div.text.strip()
except Exception as e:
logger.warning(f"提取标题失败: {e}")
try:
time_div = article_area_div.find_element(By.CSS_SELECTOR, "div.render-detail-time")
news_item.publishTime = time_div.text.strip()
except Exception as e:
logger.warning(f"提取发布时间失败: {e}")
try:
source_div = article_area_div.find_element(By.CSS_SELECTOR, "div.render-detail-source")
news_item.source = source_div.text.strip().split("")[1]
except Exception as e:
logger.warning(f"提取来源失败: {e}")
# 获取文章内容区域
try:
article_content_div = article_area_div.find_element(By.CSS_SELECTOR, "div.render-detail-article-content")
except Exception as e:
logger.warning(f"未找到文章内容区域: {e}")
return news_item
# 检查是否有分页
def is_page():
try:
page_div = article_content_div.find_element(By.CSS_SELECTOR, "div.detail-pagination-wrap")
return page_div is not None and page_div.is_displayed()
except:
return False
def get_content_rows():
"""提取文章内容行"""
try:
content_div = article_content_div.find_element(By.CSS_SELECTOR, "div.render-detail-content")
except Exception as e:
logger.warning(f"未找到内容区域: {str(e)}")
return
# 获取所有直接子元素
children = content_div.find_elements(By.XPATH, "./*")
for child in children:
try:
# 获取元素的class属性
class_name = child.get_attribute("class") or ""
# 图片元素
if "article-img" in class_name:
try:
img = child.find_element(By.TAG_NAME, "img")
img_src = img.get_attribute("src")
if img_src:
# 规范化URL
img_src = self._normalize_url(img_src)
# 添加图片标签
news_item.contentRows.append({
"type": "img",
"content": f'<img src="{img_src}" />'
})
logger.debug(f"提取图片: {img_src}")
continue
except Exception as e:
logger.warning(f"提取图片失败: {str(e)}")
# 视频元素
if "article-video" in class_name:
try:
video = child.find_element(By.TAG_NAME, "video")
video_src = video.get_attribute("src")
if video_src:
# 规范化URL
video_src = self._normalize_url(video_src)
# 添加视频标签
news_item.contentRows.append({
"type": "video",
"content": f'<video src="{video_src}" controls></video>'
})
logger.debug(f"提取视频: {video_src}")
continue
except Exception as e:
logger.warning(f"提取视频失败: {str(e)}")
# 文字元素(作为最后的兜底)
text_content = child.text.strip()
# 过滤空内容
if text_content:
news_item.contentRows.append({
"type": "text",
"content": text_content
})
logger.debug(f"提取文字: {text_content[:50]}...")
except Exception as e:
logger.warning(f"处理内容元素失败: {str(e)}")
continue
get_content_rows()
if is_page():
pass
logger.info(f"解析文章详情完成: {news_item.model_dump()}")
return news_item

View File

@@ -0,0 +1,388 @@
<!DOCTYPE html>
<!-- saved from url=(0091)https://www.xuexi.cn/dc12897105c8c496d783c5e4d3b680a2/9a75e290b9cf8cb8fb529a6e503db78d.html -->
<html lang="lang=zh-cmn-Hans" data-eusoft-scrollable-element="1"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="Cache" content="no-cache">
<meta name="description" content="“学习强国”学习平台由中宣部主管,以深入学习宣传习近平新时代中国特色社会主义思想为主要内容,建立纵向到底、横向到边学习网络,实现有组织、有指导、有管理、有服务学习,打造集大成创新学习生态。">
<title>搜索 | 学习强国</title>
<link rel="stylesheet" href="./search/page.min.css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="./search/verify.css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="./search/common.css" media="screen" title="no title" charset="utf-8">
<script src="./search/vue.min.js"></script>
<script src="./search/json3.min.js"></script>
<script src="./search/libs.js"></script>
<script src="./search/jquery.min.js"></script>
<script>
if (lessIE9()) {
location.href = '/update';
}
</script>
<!--[if IE 9]>
<style>
select { background: url("https://source.xuexi.cn/images/arrow.png") no-repeat scroll right 15px center transparent !important; }
#modal { display: none !important; }
</style>
<![endif]-->
<style>
* {
text-decoration: none;
padding: 0;
border-width: 0;
margin: 0;
border-collapse: collapse;
}
html,
body {
height: 100%;
text-align: center;
background: #fff;
}
body>* {
text-align: left;
}
[v-cloak] {
visibility: hidden;
}
#popup{
position:fixed;
width: 100%;
height: 100%;
top: 0;
right:0;
background: #cccccc;
z-index:100000;
display:none
}
#canvas{
width:140px;
height:140px;
display:none;
}
#popup img{
background:#ffffff;
width:40px;
border-radius:25px;
margin: 30px 30px;
}
#popup-ch{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
background:#FFFFFF;
width:100px;
height:100px;
}
#app {
min-width: 1250px;
}
#modal {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 10000;
display: none;
}
#alertBox {
position: fixed;
width: 350px;
height: 200px;
background: rgb(255, 255, 255);
border: 1px solid rgb(242, 243, 243);
left: 50%;
top: 40%;
border-radius: 10px;
transform: translate(-50%, -50%);
text-align: center;
box-shadow: rgba(125, 114, 114, 0.5) 0px 5px 15px;
}
#title {
text-align: center;
line-height: 50px;
padding-left: 20px;
height: 50px;
font-size: 18px;
color: rgb(61, 139, 255);
border-bottom: 1px solid rgb(242, 243, 243);
}
#close {
width: 25px;
height: 25px;
margin-top: 10px;
margin-right: 10px;
cursor: pointer;
float: right;
}
.global-image {
cursor: pointer;
}
#content {
margin: 30px 40px 20px;
font-size: 14px;
color: rgb(128, 128, 128);
height: 40px;
overflow: hidden;
}
#certain {
position: relative;
}
#btn {
height: 36px;
background: rgb(61, 139, 255);
border-radius: 18px;
width: 120px;
font-size: 13px;
cursor: pointer;
color: rgb(255, 255, 255);
bottom: 40px;
outline: none;
}
#certain :active {
border: 3px solid #0f65ff;
}
.header {
height: 460px;
position: relative;
}
.header-screen {
width: 100%;
}
.header-page {
position: relative;
width: 900px;
margin: 0 auto;
}
.content {
position: relative;
min-height: 900px;
z-index: 0;
}
.page {
position: relative;
width: 900px;
margin: 0 auto;
}
.screen {
margin: 0 auto;
width: 100%;
position: relative;
}
.footer {
position: relative;
height: 0px;
}
.footer-screen {
width: 100%;
}
.footer-page {
position: relative;
width: 900px;
margin: 0 auto;
}
.image-shadow {
position: fixed;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
top: 0;
bottom: 0;
z-index: 1000;
display:none;
}
.image-shadow .image-container {
width: 90%;
height: 90%;
margin: 2% auto;
background-position: center center;
background-size: contain;
background-repeat: no-repeat;
cursor: pointer;
}
</style>
<link rel="stylesheet" href="./search/laydate.css" id="layuicss-laydate"><style id="xuexi_alert">#title {color:#b8261a !important;}#btn {background:white !important;border:1px solid #b8261a !important;color:#b8261a !important;}#btn:active {border: 2px solid #b8261a !important;}</style><style>.eudic-tippy-content-container[_ngcontent-ng-c2787122990]{max-width:250px!important}.eusoft-chrome-extension-popup-menu[_ngcontent-ng-c2787122990]{position:fixed;z-index:2147483647;top:50%}.eusoft-chrome-extension-popup-menu.eusoft-chrome-extension-popup-menu-left[_ngcontent-ng-c2787122990]{left:4px}.eusoft-chrome-extension-popup-menu.eusoft-chrome-extension-popup-menu-right[_ngcontent-ng-c2787122990]{right:4px}.eusoft-chrome-extension-mask-container[_ngcontent-ng-c2787122990]{background-color:transparent;position:fixed;top:0;right:0;bottom:0;left:0;z-index:2147483646}</style><style>.eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{position:fixed!important;bottom:50px!important;right:50px!important;border-radius:5px!important;box-shadow:0 6px 24px #00000014!important;z-index:2147483647!important}.eusoft-eudic-translate-failed-content-script[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.light-en [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.light-fr [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.light-de [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.light-es [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.dark-en [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #595959!important;background-color:#212125!important}html.dark-fr [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #595959!important;background-color:#212125!important}html.dark-de [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #595959!important;background-color:#212125!important}html.dark-es [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #595959!important;background-color:#212125!important}html.sepia-en [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.sepia-fr [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.sepia-de [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.sepia-es [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.green-en [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.green-fr [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.green-de [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.green-es [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}</style></head>
<body id="app" style="width:100%;height:100%" data-eusoft-scrollable-element="1"><input id="csrf_token" type="hidden" value="49lljj9asgz">
<script>
var csrf_token = "49lljj9asgz";
localStorage.setItem('csrf_token', csrf_token);
localStorage.setItem('oauth', "oauth");
</script>
<div style="display:none">“学习强国”学习平台由中宣部主管,以深入学习宣传习近平新时代中国特色社会主义思想为主要内容,建立纵向到底、横向到边学习网络,实现有组织、有指导、有管理、有服务学习,打造集大成创新学习生态。</div>
<div id="modal">
<div id="alertBox">
<div id="title">
学习强国
<img src="./search/ios-close-outline.png" id="close" onclick="closeFunc()">
</div>
<div id="content"></div>
<div id="certain">
<input id="btn" type="button" value="确 定" onclick="certainFunc()">
</div>
</div>
</div>
<div id="popup">
<div id="popup-ch">
<canvas id="canvas"></canvas>
<img src="./search/loading.gif">
</div>
</div>
<div class="header" style="height: 334px;" data-eusoft-scrollable-element="1">
<div class="header-screen">
<div id="Cdcw8v5jwzdc00" class="iframe_wrap_dcw8v5jwzdc00" style="width: 100%; height: 380px; left: 0px; top: 0px; color: rgb(17, 17, 17); border: none rgb(221, 221, 221); line-height: 40px; font-size: 14px; text-align: left; position: absolute; box-sizing: border-box;" data-eusoft-scrollable-element="1">
<iframe sanbox="allow-scripts allow-top-navigation" src="./search/648fafc83297345be269377aefc53c9e.html" scrolling="no" frameborder="0" style="width: 100%; height: 100%;"></iframe>
</div>
</div>
<div class="header-page">
<style>
.word-item:hover {
color: #d30000 !important;
}
#Cdcw8v5jwzdc00{
overflow: hidden;
}
</style>
</div>
</div>
<div class="content" data-eusoft-scrollable-element="1">
<div class="screen" data-eusoft-scrollable-element="1">
<style> #C7bedzpbx77c00 { width:100%;left:0;top:0px;overflow:visible;border:none;display:flex;align-items:center;flex-direction:column;z-index:999;-js-display:flex;box-sizing:border-box;border-color:#000;padding-top:40px;position:absolute;box-sizing: border-box; } </style>
<div id="C7bedzpbx77c00" control="div" data-eusoft-scrollable-element="1">
<style> #Canghrjlp7z400 { width:1000px;overflow:visible;border:none;display:flex;flex-direction:row;-js-display:flex;box-sizing:border-box;border-color:#000;box-sizing: border-box; } </style>
<div id="Canghrjlp7z400" control="div"><div id="C8y9uqeb429800" style="color:#666666;overflow:hidden;border:none;box-sizing:border-box;border-color:#000;line-height:22px;font-size:14px;text-align:left;text-decoration:none;cursor:pointer;box-sizing: border-box;" control="text" title="">学习强国</div><div id="Cksghjs3v45c00" style="color:#666666;overflow:hidden;border:none;box-sizing:border-box;border-color:#000;margin-right:5px;margin-left:5px;line-height:20px;font-size:14px;text-align:left;text-decoration:none;box-sizing: border-box;" control="text" title="">&gt;&gt;</div><div id="C1r1mkdwv216o0" style="color:#666666;overflow:hidden;border:none;box-sizing:border-box;border-color:#000;margin-right:200px;line-height:22px;font-size:14px;text-align:left;text-decoration:none;box-sizing: border-box;" control="text" title="">搜索</div>
</div>
<style> #C7hjwlajj8vo00 { overflow:visible;width:1000px;border:none;display:flex;flex-direction:row;z-index:999;-js-display:flex;margin-bottom:30px;border-color:#000;box-sizing:border-box;min-height:400px;box-sizing: border-box; } </style>
<div id="C7hjwlajj8vo00" control="div">
<style> #C4z9fzzh5nyc00 { overflow:visible;width:100%;border:none;display:flex;flex-direction:column;z-index:999;-js-display:flex;margin-right:20px;border-color:#d30000;box-sizing:border-box;box-sizing: border-box; } </style>
<div id="C4z9fzzh5nyc00" control="div">
<style> #Ciugctdj1v4w00 { width:100%;overflow:visible;border:none;display:flex;flex-direction:column;z-index:2;-js-display:flex;box-sizing:border-box;border-color:#000;padding-top:20px;padding-bottom:20px;box-sizing: border-box; } </style>
<div id="Ciugctdj1v4w00" control="div">
<div id="C4rynkt6j5oy00" class="iframe_wrap_4rynkt6j5oy00" style="width: 100%; height: 746px; color: rgb(17, 17, 17); border: none rgb(221, 221, 221); line-height: 40px; font-size: 14px; text-align: left; box-sizing: border-box;" data-eusoft-scrollable-element="1">
<iframe src="./search/index.html" scrolling="no" frameborder="0" style="width: 100%; height: 100%;"></iframe>
</div>
</div>
</div>
</div>
<style> #Cbf384zwh0o000 { overflow:visible;width:1000px;border:none;display:flex;flex-direction:row;-js-display:flex;border-color:#000;box-sizing:border-box;box-sizing: border-box; } </style>
<div id="Cbf384zwh0o000" control="div" data-eusoft-scrollable-element="1">
<div id="Cfi31c8xbe4800" style="width:100%;border:none;border-color:#000;box-sizing:border-box;box-sizing: border-box;" data-eusoft-scrollable-element="1">
<style> #Cen05onrr1ts00 { width:100%;overflow:visible;border:none;display:flex;flex-direction:row;justify-content:center;-js-display:flex;box-sizing:border-box;border-color:#000;box-sizing: border-box; } </style>
<div id="Cen05onrr1ts00" control="div" data-eusoft-scrollable-element="1">
<style> #Caqmiq8w5e8800 { width:1000px;height:500px;overflow:visible;border:none;display:flex;flex-direction:row;justify-content:center;-js-display:flex;box-sizing:border-box;border-color:#000;box-sizing: border-box; } </style>
<div id="Caqmiq8w5e8800" control="div" data-eusoft-scrollable-element="1">
<div id="C40civ6enros00" class="iframe_wrap_40civ6enros00" style="width:100%;height:500px;color:#111;border:none;box-sizing:border-box;border-color:#ddd;line-height:40px;font-size:14px;text-align:left;box-sizing: border-box;" data-eusoft-scrollable-element="1">
<iframe src="./search/60bd1d03c55149fd0e92da70d074d72b.html" scrolling="no" frameborder="0" style="width: 100%; height: 100%;"></iframe>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="page">
<script type="text/JavaScript">
var search = window.location.search;
var ts=new Date().getTime()
//var sUrl = 'https://static-pre.xxptcs.com/search/pre/index.html'
var sUrl = 'https://static.xuexi.cn/search/online/index.html'
//var sUrl ='https://static-pre.xxptcs.com/search/test/index.html'
if (search) {
console.log('search yes! dom:', document.querySelector('#C4rynkt6j5oy00 iframe'));
console.log(sUrl)
document.querySelector('#C4rynkt6j5oy00 iframe').src = sUrl + search + '&t=' + ts;
} else {
document.querySelector('#C4rynkt6j5oy00 iframe').src = sUrl + '?t=' + ts;
}
window.addEventListener("message", function (e) {
console.log('e:', e)
console.log('e.data:', e.data)
var ifr = document.querySelector('#C4rynkt6j5oy00 iframe')
try {
var params = JSON.parse(e.data);
if (params.type) {
console.log('params.type:', params.type);
console.log('params.data:', params.data);
switch (params.type) {
case 'resize': // {type: 'resize', data:{height: 100}}
var ele = document.querySelector('#C4rynkt6j5oy00')
var height = params.data.height
ele.style.height = height + 'px';
if (lessIEVersion(11)) {
var footer = document.querySelector('#Cbf384zwh0o000')
footer.style['z-index'] = 10000
footer.style.top = height + 50 + 'px'
footer.style.top = height + (812 - 298) / 3 + 'px'
}
break;
case 'search': // {type: 'search', data:{query: '学习', page: 1}}
var useQuestionMark = false;
// var targetUrl = 'https://pretest.xuexi.cn/dc12897105c8c496d783c5e4d3b680a2/9a75e290b9cf8cb8fb529a6e503db78d.html';
var targetUrl = 'https://www.xuexi.cn/dc12897105c8c496d783c5e4d3b680a2/9a75e290b9cf8cb8fb529a6e503db78d.html'
//var targetUrl = 'https://pretest.xxptcs.com/dc12897105c8c496d783c5e4d3b680a2/9a75e290b9cf8cb8fb529a6e503db78d.html'
for (var key in params.data) {
var value = params.data[key];
var op = '&'
if (!useQuestionMark) {
op = '?';
useQuestionMark = true;
}
targetUrl += op + key + '=' + value;
}
window.location.href = targetUrl;
break;
default:
break;
}
}
} catch (error) {
console.log(error)
}
}, false);
</script>
</div>
</div>
<div class="footer">
<div class="footer-screen">
</div>
<div class="footer-page">
</div>
</div>
<script src="./search/page.min.js"></script>
<script src="./search/page.min(1).js"></script>
<script src="./search/page.min(2).js"></script>
<script src="./search/verify.min.js"></script>
<script src="./search/laydate.js"></script>
<script src="./search/data9a75e290b9cf8cb8fb529a6e503db78d.js"></script>
<script src="./search/9a75e290b9cf8cb8fb529a6e503db78d.js"></script>
<div class="image-shadow"> <div class="image-container"> </div> </div>
<script>
$(".image-shadow").click(function () {
$(this).hide();
})
</script>
<div id="gallery_global" style="display:none"></div>
</body><eusoft-chrome-extension-root-en id="eusoft-chrome-extension-id-en" _nghost-ng-c2787122990="" ng-version="18.2.13"><template _ngcontent-ng-c2787122990=""></template><!----><!----><!----><app-word-hint-render _ngcontent-ng-c2787122990="" _nghost-ng-c3386348173=""><template _ngcontent-ng-c3386348173=""></template><!----><!----></app-word-hint-render><app-translate-render _ngcontent-ng-c2787122990="" _nghost-ng-c749930229=""><template _ngcontent-ng-c749930229=""></template><!----></app-translate-render><app-capture-word _ngcontent-ng-c2787122990="" class="eusoft-chrome-extension-capture-word-container ng-tns-c4033922151-0 ng-star-inserted"><template shadowrootmode="open"><style>.eudic-tippy-content-container[_ngcontent-ng-c2787122990]{max-width:250px!important}.eusoft-chrome-extension-popup-menu[_ngcontent-ng-c2787122990]{position:fixed;z-index:2147483647;top:50%}.eusoft-chrome-extension-popup-menu.eusoft-chrome-extension-popup-menu-left[_ngcontent-ng-c2787122990]{left:4px}.eusoft-chrome-extension-popup-menu.eusoft-chrome-extension-popup-menu-right[_ngcontent-ng-c2787122990]{right:4px}.eusoft-chrome-extension-mask-container[_ngcontent-ng-c2787122990]{background-color:transparent;position:fixed;top:0;right:0;bottom:0;left:0;z-index:2147483646}</style><style>.eusoft-eudic-chrome-extension-explain-icon-class{position:fixed!important;visibility:visible!important;z-index:2147483646!important}.eusoft-eudic-chrome-extension-explain-popover-container-class{position:relative!important}.eusoft-eudic-chrome-extension-explain-container-class{position:fixed!important;visibility:visible!important;min-width:100px;height:auto!important;z-index:2147483646!important}.eudic-explain-content-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2147483647}.eusoft-eudic-chrome-extension-explain-container-border-radius-class{box-shadow:0 2px 5px 1px #403c4329!important;border-radius:10px!important;overflow:hidden!important;background-color:#fff!important;box-sizing:border-box}.eudic-explain-resizer{z-index:2147483646!important;opacity:1;width:16px;height:16px;position:absolute}.eudic-explain-resizer-right{top:0;right:-8px;width:8px;height:100%;cursor:ew-resize}.eudic-explain-resizer-bottom{bottom:-8px;left:0;width:100%;cursor:ns-resize}.eudic-explain-resizer-top{top:-8px;left:0;width:100%;cursor:ns-resize}.eudic-explain-resizer-left{top:0;left:-8px;height:100%;cursor:ew-resize}.eudic-explain-resizer-bottom-right{right:-8px;bottom:-8px;cursor:nwse-resize}.eudic-explain-resizer-bottom-left{left:-8px;bottom:-8px;cursor:nesw-resize}.eudic-explain-content-inner{position:relative}.eudic-toolbar-container{cursor:move;display:flex;flex-direction:row;align-items:center;padding-left:12px;padding-right:12px;justify-content:space-between}.eudic-toolbar-left-actions,.eudic-toolbar-right-actions{display:flex;flex-direction:row;align-items:center}.eudic-toolbar-container-title{font-size:14px;font-family:Helvetica;-webkit-user-select:none;user-select:none;line-height:1;word-break:break-word}.eudic-toolbar-container-title-icon{width:16px;height:16px;margin-right:8px}.eudic-toolbar-right-expand-button,.eudic-toolbar-right-lock-button{margin-right:16px;cursor:pointer;width:16px;height:16px;display:flex;align-items:center}.eudic-toolbar-right-close-button{cursor:pointer;width:16px;height:16px;display:flex;align-items:center}.eudic-toolbar-inner-icon{width:16px;height:16px;display:flex}.eusoft-eudic-chrome-extension-explain-popover-container-class[data-content-script-theme=light] .eusoft-eudic-chrome-extension-explain-container-border-radius-class,.eusoft-eudic-chrome-extension-explain-popover-container-class[data-content-script-theme=light] .eudic-toolbar-container{background-color:#f7f9fc}.eusoft-eudic-chrome-extension-explain-popover-container-class[data-content-script-theme=light] .eudic-toolbar-container-title{color:#202124}.eusoft-eudic-chrome-extension-explain-popover-container-class[data-content-script-theme=dark] .eusoft-eudic-chrome-extension-explain-container-border-radius-class,.eusoft-eudic-chrome-extension-explain-popover-container-class[data-content-script-theme=dark] .eudic-toolbar-container{background-color:#141414}.eusoft-eudic-chrome-extension-explain-popover-container-class[data-content-script-theme=dark] .eudic-toolbar-container-title{color:#e6e6e6}
</style><style>.eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{position:fixed!important;bottom:50px!important;right:50px!important;border-radius:5px!important;box-shadow:0 6px 24px #00000014!important;z-index:2147483647!important}.eusoft-eudic-translate-failed-content-script[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.light-en [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.light-fr [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.light-de [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.light-es [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.dark-en [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #595959!important;background-color:#212125!important}html.dark-fr [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #595959!important;background-color:#212125!important}html.dark-de [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #595959!important;background-color:#212125!important}html.dark-es [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #595959!important;background-color:#212125!important}html.sepia-en [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.sepia-fr [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.sepia-de [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.sepia-es [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.green-en [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.green-fr [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.green-de [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}html.green-es [_nghost-ng-c3081775404] .eusoft-eudic-translate-failed-container[_ngcontent-ng-c3081775404]{border:1px solid #E8E8E8!important;background-color:#f8fafe!important}</style><!----><!----><div class="eusoft-eudic-chrome-extension-explain-popover-container-class ng-tns-c4033922151-0" data-content-script-theme="light"><!----></div></template></app-capture-word><app-translate-failed-retry _ngcontent-ng-c2787122990="" _nghost-ng-c3081775404=""><!----></app-translate-failed-retry><!----><!----></eusoft-chrome-extension-root-en></html>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,169 @@
function getUrlParam(name) {
var query = globalCache.sysQuery;
return query[name];
}
function getUrlParamOrigin(name) {
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)');
var r = window.location.search.substr(1).match(reg);
if (r != null) {
return decodeURIComponent(r[2]);
}
return null; //返回参数值
}
new Vue({
el:'#app',
data:{"judgeHtml_dvo2c4bok2w00":"","src_7bedzpbx77c00":"","mode_7bedzpbx77c00":2,"src_anghrjlp7z400":"","mode_anghrjlp7z400":2,"innerText_8y9uqeb429800":"学习强国","innerText_ksghjs3v45c00":">>","innerText_1r1mkdwv216o0":"搜索","src_7hjwlajj8vo00":"","mode_7hjwlajj8vo00":2,"src_4z9fzzh5nyc00":"","mode_4z9fzzh5nyc00":2,"src_iugctdj1v4w00":"","mode_iugctdj1v4w00":2,"src_bf384zwh0o000":"","mode_bf384zwh0o000":2,"value_fi31c8xbe4800":[],"pageSet_fi31c8xbe4800":0,"loadMore_fi31c8xbe4800":0,"src_en05onrr1ts00":"","mode_en05onrr1ts00":2,"src_aqmiq8w5e8800":"","mode_aqmiq8w5e8800":2,"currentPageId":"9a75e290b9cf8cb8fb529a6e503db78d","currentUser":"","location_latitude":"","location_longitude":"","localization":"zh","currentRoleAuthList":[],"judgeHtml_imto2r1bquw00":""},
computed:{
},
watch:{
},
filters: {
formatDateFilter: function(timestamp, fmt) {
if (timestamp) {
if (!isNaN(timestamp)) {
timestamp = parseInt(timestamp)
}
if (!isNaN(timestamp) && timestamp.toString().length == '10') {
timestamp = timestamp * 1000
}
return formatDate(fmt, timestamp)
}
return ''
}
},
created: function(){
if ('pc' == 'pc') {
if (typeof dd != 'undefined') {
dd = DingTalkPC
}
}
window.ddenv = {
corpId: '',
agentId: '',
appId: 'dingoankubyrfkttorhpou'
};
if (typeof dd != 'undefined') {
var url = '/api/dingtalk/auth';
var params = { url: location.href };
httpPost(url, params).done(function (res) {
res = res.data
var ddoptions = {
agentId: window.ddenv.agentId, // 必填微应用ID,
corpId: window.ddenv.corpId,
jsApiList: [
'runtime.info',
'device.notification.alert',
'device.notification.confirm',
'device.notification.prompt',
'device.notification.toast',
'runtime.permission.requestAuthCode', // 获取免登授权码
'device.geolocation.get', // 获取地理位置信息
'device.base.getUUID', // 获取uuid
'biz.util.uploadImageFromCamera',
'biz.util.uploadImage',
'device.accelerometer.watchShake',
'biz.util.scan',
'biz.user.get',
'biz.cspace.saveFile',
'biz.cspace.preview',
'biz.cspace.chooseSpaceDir',
'biz.util.uploadAttachment'
]
}
ddoptions.nonceStr = res.nonceStr
ddoptions.timeStamp = res.timeStamp
ddoptions.signature = res.signature
// console.log(ddoptions);
dd.config(ddoptions);
// dd ready
dd.ready(function (res) {
var apiUrl = '/api/dingtalk'
dingtalk.runtime.permission.requestAuthCode({
//企业ID
corpId: window.ddenv.corpId,
onSuccess: function (result) {},
onFail: function (err) {}
})
})
})
}
if (this.onChangeCookie) this.onChangeCookie();
if (this.getUserAuthList) this.getUserAuthList();
this.currentUser = localStorage.getItem('phone') || '';this.flow_method_2cpphhyfebk00();
},
ready: function() {
if(lessIEVersion(11)) {
if(document.styleSheets) {
document.styleSheets[0].addRule('style', 'display: none !important;');
}
flexibility(document.body);
document.styleSheets[0].addRule('.screen', 'position: relative !important;');
} else if(lessIE9()) {
alert('您的浏览器版本过低,为了更好的体验,建议升级到IE9以上版本');
}
},
methods: {
click_8y9uqeb429800:function(){var that = this; var url = "/";window.open(url);},
onChangeCookie:
function () {
var that = this;
var localizationFlag = Cookies.get('localization');
if ( localizationFlag ){
that.localization = localizationFlag;
}
},
flow_method_2cpphhyfebk00:
function(item, event) {
item = item || {};
event = event || {};
// document初始化
var self = this
try {
// FLOW [COMPUTE] 1
var res_1_0 =
function() {
var template = '#a# | 学习强国'
var param = {
a: document.title
}
for(var key in param) {
var value = param[key]
if(Object.prototype.toString.call(value) == '[object Array]') {
value = value.join(',')
}
var source = '#' + key + '#'
template = template.replace(source, value)
}
return template
}()
document.title = res_1_0
} catch(e) {
console.error(e.stack);
}
},
logout: function () {
localStorage.removeItem('phone');
httpPost("/api/logout").done(function (res) {
location.href = "/login";
});
}
}
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,514 @@
/**
* Created by jyy on 18/8/25.
*/
/* 复选框 checkbox */
.checkbox-div {
margin-right: 10px;
display: inline-block;
}
.default-checkbox {
height: 20px;
width: 20px;
vertical-align: middle;
}
.third-checkbox,
.fourth-checkbox {
-webkit-appearance: none;
-moz-appearance: none;
-o-appearance: none;
appearance: none;
}
.third-checkbox {
background: #eaeaea;
color: #fff;
height: 30px;
width: 30px;
vertical-align: middle;
outline-style: none;
border-radius: 15%;
}
.third-checkbox::before {
height: 30px;
width: 30px;
left: 0;
top: 0;
border-radius: 15%;
text-align: center;
display: block;
margin: 0 auto;
font-family: 'FontAwesome';
content: "\f1ce";
line-height: 30px;
color: #FFFFFF;
font-size: 18px;
background: #b5b5b5;
}
.third-checkbox:checked:before {
height: 30px;
width: 30px;
left: 0;
top: 0;
border-radius: 15%;
text-align: center;
display: block;
margin: 0 auto;
font-family: 'FontAwesome';
content: "\f00c";
line-height: 30px;
color: #FFFFFF;
font-size: 18px;
background: #3498db;
}
.fourth-checkbox {
display: none;
}
label.label-for-fourth-checkbox {
line-height: 1;
padding: 5px 15px;
}
.fourth-checkbox:checked+.label-for-fourth-checkbox {
color: #fff;
background-color: #4899cc;
}
.checkbox-inline {
padding-left: 5px;
font-weight: normal;
vertical-align: middle;
cursor: pointer;
padding-right: 10px;
margin: 10px 0 10px 0;
}
.mui-checkbox-con {
margin-top: 10px;
}
.mui-checkbox {
vertical-align: middle;
position: relative;
width: 22px;
height: 22px;
background-color: #FFFFFF;
border: solid 1px #d9d9d9;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
background-clip: padding-box;
-webkit-appearance: none;
}
.mui-checkbox:focus {
outline: 0 none;
outline-offset: -2px;
}
.mui-checkbox:checked {
background-color: #18b4ed;
border: solid 1px #F6A623;
}
.mui-checkbox:checked:before {
display: inline-block;
margin-left: 2px;
font-family: 'FontAwesome';
content: "\f00c";
line-height: 22px;
color: #FFFFFF;
font-size: 16px;
}
.mui-checkbox:before {
margin-left: 2px;
font-family: 'FontAwesome';
content: "";
line-height: 22px;
color: #FFFFFF;
font-size: 16px;
}
.mui-checkbox.checkbox-orange:checked {
background-color: #F6A623;
}
/* div */
.div-background-img-stretching {
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}
.div-background-repeat-img {
width: 100%;
height: 100%;
background-repeat: repeat;
}
/* image_upload */
.upload-progress-wrap {
position: fixed;
top: 0;
left: 0;
height: 3px;
width: 100%;
background: #eeeeee;
display: none;
}
.upload-progress {
background-color: #3797ea;
height: 100%;
}
.hex-image-upload {
padding: 5px;
display: flex;
}
.hex_image_upload_btn {
margin-top: 30px;
width: 40px;
height: 40px;
position: relative;
}
.hex_image_upload_btn .upload_button .fa-cloud-upload {
font-size: 33px;
}
.hex_upload_btn {
position: relative;
}
.hex_image {
position: absolute;
left: 0;
top: 0;
opacity: 0;
width: 40px;
height: 40px;
}
/* img */
.background-img-stretching {
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}
.background-repeat-img {
width: 100%;
height: 100%;
background-repeat: repeat;
}
.background-contain-img {
background-repeat: no-repeat;
background-position: center;
background-size: contain;
}
/* input */
.hex_input_normal {
outline:none;
}
.hex_input_search input[type=text]::-ms-clear {
display: none;
}
.hex_input_search input {
outline: none;
height: 100%;
width: 100%;
vertical-align: top;
padding-left: 10px;
box-sizing: border-box;
}
.hex_input_search ul {
position: relative;
left: 0;
border-left: #eee 1px solid;
border-right: #eee 1px solid;
min-width: 100%;
text-align: left;
max-height: 300px;
overflow-x: hidden;
overflow-y: scroll;
background: #fff;
margin-top: -1px;
box-sizing: border-box;
}
.hex_input_search ul li {
padding-left: 10px;
box-sizing: border-box;
line-height: 30px;
}
.hex_input_search ul li:nth-child(1) {
border-top: #eee 1px solid;
}
.hex_input_search ul li:last-child {
border-bottom: #eee 1px solid;
}
.hex_input_search ul a {
color: inherit;
height: 20px;
font-size: 13px;
}
/* 视频上传 video_upload */
.hex-video-upload {
padding: 5px;
display: flex;
flex-direction: column;
}
.hex_video_upload_btn {
margin-top: 10px;
width: 65px;
height: 40px;
position: relative;
}
.hex_video {
position: absolute;
left: 0;
top: 0;
opacity: 0;
width: 65px;
height: 40px;
}
.remove_btn {
border-color: red;
border-style: solid;
border-width: 1px;
width: 18px;
margin-left: 3px;
display: inline-block;
text-align: center;
}
/* switch_btn */
.hex-switch-container {
background-color: #fff;
border: 1px solid #dfdfdf;
border-radius: 20px;
cursor: pointer;
display: inline-block;
height: 30px;
position: relative;
vertical-align: middle;
width: 50px;
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
-webkit-background-clip: content-box;
background-clip: content-box;
}
.hex-switch-container .mark {
background: #fff;
border-radius: 100%;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
height: 30px;
position: absolute;
top: 0;
width: 30px;
}
.hex-switch-container.on {
background-color: rgb(100, 189, 99);
}
.hex-switch-container.on .mark {
margin-left: 20px;
}
/*sort_control*/
.custom-sort-control {
padding-left: 5px;
padding-right: 5px;
display: inline-block;
height: inherit;
line-height: inherit;
width: 140px;
border: 1px solid #F1F1F1;
text-align: center;
font-size: inherit;
font-weight: inherit;
color: inherit;
}
.custom-sort-control .custom-radio {
-webkit-appearance: none;
-moz-appearance: none;
-o-appearance: none;
appearance: none;
}
.custom-sort-control .sort {
position: relative;
padding-right: 20px;
}
.custom-sort-control .sort:before,
.custom-sort-control .sort:after {
position: absolute;
right: 5px;
z-index: 1;
font-size: 12px;
}
.custom-sort-control .sort:before {
top: 2px;
content: "\f0de";
font-family: fontawesome;
color: #e1e1e1;
}
.custom-sort-control .sort:after {
bottom: 2px;
content: "\f0dd";
font-family: fontawesome;
color: #e1e1e1;
}
.custom-sort-control .sort.up:before,
.custom-sort-control .sort.down:after {
color: #5A7AFF;
}
.custom-sort-control .custom-sort-control .active {
background-color: #F7F7F7;
color: #5A7AFF;
}
/*radio*/
.radio-inline {
padding-left: 5px;
margin-bottom: 0;
font-weight: normal;
vertical-align: middle;
cursor: pointer;
padding-right: 5px;
}
.radio-div {
display: inline-block;
}
.custom-radio {
-webkit-appearance: none;
-moz-appearance: none;
-o-appearance: none;
appearance: none;
display: none;
}
/*分页*/
.pagination {
list-style: none;
display: inline-block;
border-radius: 4px;
}
.pagination>li {
position: relative;
float: left;
padding: 3px 12px;
border: 1px solid #D3D4D5;
cursor: pointer;
line-height: 20px;
/*width: 14px;*/
font-size: inherit;
font-weight: inherit;
margin-left: 3px;
}
.pagination .num,
.pagination .pre,
.pagination .next {
color: inherit;
background-color: #fff;
}
.pagination .more {
color: inherit;
border: 0px;
padding: 0px;
}
.pagination .total {
width: 14px;
border: 0px;
color: inherit;
}
.number {
width: 35px;
height: 26px;
font-size: inherit;
border: 1px solid #D3D4D5;
text-align: center;
display: inline-block;
line-height: 26px;
vertical-align: top;
margin-top: 1px;
}
.jump {
width: 35px;
height: 26px;
font-size: inherit;
border: 1px solid #D3D4D5;
text-align: center;
display: inline-block;
line-height: 26px;
vertical-align: top;
margin-top: 1px;
cursor: pointer;
}
.text {
margin-top: 2px;
margin-left: 5px;
margin-right: 5px;
display: inline-block;
line-height: 26px;
vertical-align: top;
}

View File

@@ -0,0 +1 @@
globalCache = {"sysQuery":{"pageId":"9a75e290b9cf8cb8fb529a6e503db78d"}};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,17 @@
/*! JSON v3.3.2 | http://bestiejs.github.io/json3 | Copyright 2012-2014, Kit Cambridge | http://kit.mit-license.org */
(function(){function N(p,r){function q(a){if(q[a]!==w)return q[a];var c;if("bug-string-char-index"==a)c="a"!="a"[0];else if("json"==a)c=q("json-stringify")&&q("json-parse");else{var e;if("json-stringify"==a){c=r.stringify;var b="function"==typeof c&&s;if(b){(e=function(){return 1}).toJSON=e;try{b="0"===c(0)&&"0"===c(new t)&&'""'==c(new A)&&c(u)===w&&c(w)===w&&c()===w&&"1"===c(e)&&"[1]"==c([e])&&"[null]"==c([w])&&"null"==c(null)&&"[null,null,null]"==c([w,u,null])&&'{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}'==
c({a:[e,!0,!1,null,"\x00\b\n\f\r\t"]})&&"1"===c(null,e)&&"[\n 1,\n 2\n]"==c([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==c(new C(-864E13))&&'"+275760-09-13T00:00:00.000Z"'==c(new C(864E13))&&'"-000001-01-01T00:00:00.000Z"'==c(new C(-621987552E5))&&'"1969-12-31T23:59:59.999Z"'==c(new C(-1))}catch(f){b=!1}}c=b}if("json-parse"==a){c=r.parse;if("function"==typeof c)try{if(0===c("0")&&!c(!1)){e=c('{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}');var n=5==e.a.length&&1===e.a[0];if(n){try{n=!c('"\t"')}catch(d){}if(n)try{n=
1!==c("01")}catch(g){}if(n)try{n=1!==c("1.")}catch(m){}}}}catch(X){n=!1}c=n}}return q[a]=!!c}p||(p=k.Object());r||(r=k.Object());var t=p.Number||k.Number,A=p.String||k.String,H=p.Object||k.Object,C=p.Date||k.Date,G=p.SyntaxError||k.SyntaxError,K=p.TypeError||k.TypeError,L=p.Math||k.Math,I=p.JSON||k.JSON;"object"==typeof I&&I&&(r.stringify=I.stringify,r.parse=I.parse);var H=H.prototype,u=H.toString,v,B,w,s=new C(-0xc782b5b800cec);try{s=-109252==s.getUTCFullYear()&&0===s.getUTCMonth()&&1===s.getUTCDate()&&
10==s.getUTCHours()&&37==s.getUTCMinutes()&&6==s.getUTCSeconds()&&708==s.getUTCMilliseconds()}catch(Q){}if(!q("json")){var D=q("bug-string-char-index");if(!s)var x=L.floor,M=[0,31,59,90,120,151,181,212,243,273,304,334],E=function(a,c){return M[c]+365*(a-1970)+x((a-1969+(c=+(1<c)))/4)-x((a-1901+c)/100)+x((a-1601+c)/400)};(v=H.hasOwnProperty)||(v=function(a){var c={},e;(c.__proto__=null,c.__proto__={toString:1},c).toString!=u?v=function(a){var c=this.__proto__;a=a in(this.__proto__=null,this);this.__proto__=
c;return a}:(e=c.constructor,v=function(a){var c=(this.constructor||e).prototype;return a in this&&!(a in c&&this[a]===c[a])});c=null;return v.call(this,a)});B=function(a,c){var e=0,b,f,n;(b=function(){this.valueOf=0}).prototype.valueOf=0;f=new b;for(n in f)v.call(f,n)&&e++;b=f=null;e?B=2==e?function(a,c){var e={},b="[object Function]"==u.call(a),f;for(f in a)b&&"prototype"==f||v.call(e,f)||!(e[f]=1)||!v.call(a,f)||c(f)}:function(a,c){var e="[object Function]"==u.call(a),b,f;for(b in a)e&&"prototype"==
b||!v.call(a,b)||(f="constructor"===b)||c(b);(f||v.call(a,b="constructor"))&&c(b)}:(f="valueOf toString toLocaleString propertyIsEnumerable isPrototypeOf hasOwnProperty constructor".split(" "),B=function(a,c){var e="[object Function]"==u.call(a),b,h=!e&&"function"!=typeof a.constructor&&F[typeof a.hasOwnProperty]&&a.hasOwnProperty||v;for(b in a)e&&"prototype"==b||!h.call(a,b)||c(b);for(e=f.length;b=f[--e];h.call(a,b)&&c(b));});return B(a,c)};if(!q("json-stringify")){var U={92:"\\\\",34:'\\"',8:"\\b",
12:"\\f",10:"\\n",13:"\\r",9:"\\t"},y=function(a,c){return("000000"+(c||0)).slice(-a)},R=function(a){for(var c='"',b=0,h=a.length,f=!D||10<h,n=f&&(D?a.split(""):a);b<h;b++){var d=a.charCodeAt(b);switch(d){case 8:case 9:case 10:case 12:case 13:case 34:case 92:c+=U[d];break;default:if(32>d){c+="\\u00"+y(2,d.toString(16));break}c+=f?n[b]:a.charAt(b)}}return c+'"'},O=function(a,c,b,h,f,n,d){var g,m,k,l,p,r,s,t,q;try{g=c[a]}catch(z){}if("object"==typeof g&&g)if(m=u.call(g),"[object Date]"!=m||v.call(g,
"toJSON"))"function"==typeof g.toJSON&&("[object Number]"!=m&&"[object String]"!=m&&"[object Array]"!=m||v.call(g,"toJSON"))&&(g=g.toJSON(a));else if(g>-1/0&&g<1/0){if(E){l=x(g/864E5);for(m=x(l/365.2425)+1970-1;E(m+1,0)<=l;m++);for(k=x((l-E(m,0))/30.42);E(m,k+1)<=l;k++);l=1+l-E(m,k);p=(g%864E5+864E5)%864E5;r=x(p/36E5)%24;s=x(p/6E4)%60;t=x(p/1E3)%60;p%=1E3}else m=g.getUTCFullYear(),k=g.getUTCMonth(),l=g.getUTCDate(),r=g.getUTCHours(),s=g.getUTCMinutes(),t=g.getUTCSeconds(),p=g.getUTCMilliseconds();
g=(0>=m||1E4<=m?(0>m?"-":"+")+y(6,0>m?-m:m):y(4,m))+"-"+y(2,k+1)+"-"+y(2,l)+"T"+y(2,r)+":"+y(2,s)+":"+y(2,t)+"."+y(3,p)+"Z"}else g=null;b&&(g=b.call(c,a,g));if(null===g)return"null";m=u.call(g);if("[object Boolean]"==m)return""+g;if("[object Number]"==m)return g>-1/0&&g<1/0?""+g:"null";if("[object String]"==m)return R(""+g);if("object"==typeof g){for(a=d.length;a--;)if(d[a]===g)throw K();d.push(g);q=[];c=n;n+=f;if("[object Array]"==m){k=0;for(a=g.length;k<a;k++)m=O(k,g,b,h,f,n,d),q.push(m===w?"null":
m);a=q.length?f?"[\n"+n+q.join(",\n"+n)+"\n"+c+"]":"["+q.join(",")+"]":"[]"}else B(h||g,function(a){var c=O(a,g,b,h,f,n,d);c!==w&&q.push(R(a)+":"+(f?" ":"")+c)}),a=q.length?f?"{\n"+n+q.join(",\n"+n)+"\n"+c+"}":"{"+q.join(",")+"}":"{}";d.pop();return a}};r.stringify=function(a,c,b){var h,f,n,d;if(F[typeof c]&&c)if("[object Function]"==(d=u.call(c)))f=c;else if("[object Array]"==d){n={};for(var g=0,k=c.length,l;g<k;l=c[g++],(d=u.call(l),"[object String]"==d||"[object Number]"==d)&&(n[l]=1));}if(b)if("[object Number]"==
(d=u.call(b))){if(0<(b-=b%1))for(h="",10<b&&(b=10);h.length<b;h+=" ");}else"[object String]"==d&&(h=10>=b.length?b:b.slice(0,10));return O("",(l={},l[""]=a,l),f,n,h,"",[])}}if(!q("json-parse")){var V=A.fromCharCode,W={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},b,J,l=function(){b=J=null;throw G();},z=function(){for(var a=J,c=a.length,e,h,f,k,d;b<c;)switch(d=a.charCodeAt(b),d){case 9:case 10:case 13:case 32:b++;break;case 123:case 125:case 91:case 93:case 58:case 44:return e=
D?a.charAt(b):a[b],b++,e;case 34:e="@";for(b++;b<c;)if(d=a.charCodeAt(b),32>d)l();else if(92==d)switch(d=a.charCodeAt(++b),d){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=W[d];b++;break;case 117:h=++b;for(f=b+4;b<f;b++)d=a.charCodeAt(b),48<=d&&57>=d||97<=d&&102>=d||65<=d&&70>=d||l();e+=V("0x"+a.slice(h,b));break;default:l()}else{if(34==d)break;d=a.charCodeAt(b);for(h=b;32<=d&&92!=d&&34!=d;)d=a.charCodeAt(++b);e+=a.slice(h,b)}if(34==a.charCodeAt(b))return b++,e;l();default:h=
b;45==d&&(k=!0,d=a.charCodeAt(++b));if(48<=d&&57>=d){for(48==d&&(d=a.charCodeAt(b+1),48<=d&&57>=d)&&l();b<c&&(d=a.charCodeAt(b),48<=d&&57>=d);b++);if(46==a.charCodeAt(b)){for(f=++b;f<c&&(d=a.charCodeAt(f),48<=d&&57>=d);f++);f==b&&l();b=f}d=a.charCodeAt(b);if(101==d||69==d){d=a.charCodeAt(++b);43!=d&&45!=d||b++;for(f=b;f<c&&(d=a.charCodeAt(f),48<=d&&57>=d);f++);f==b&&l();b=f}return+a.slice(h,b)}k&&l();if("true"==a.slice(b,b+4))return b+=4,!0;if("false"==a.slice(b,b+5))return b+=5,!1;if("null"==a.slice(b,
b+4))return b+=4,null;l()}return"$"},P=function(a){var c,b;"$"==a&&l();if("string"==typeof a){if("@"==(D?a.charAt(0):a[0]))return a.slice(1);if("["==a){for(c=[];;b||(b=!0)){a=z();if("]"==a)break;b&&(","==a?(a=z(),"]"==a&&l()):l());","==a&&l();c.push(P(a))}return c}if("{"==a){for(c={};;b||(b=!0)){a=z();if("}"==a)break;b&&(","==a?(a=z(),"}"==a&&l()):l());","!=a&&"string"==typeof a&&"@"==(D?a.charAt(0):a[0])&&":"==z()||l();c[a.slice(1)]=P(z())}return c}l()}return a},T=function(a,b,e){e=S(a,b,e);e===
w?delete a[b]:a[b]=e},S=function(a,b,e){var h=a[b],f;if("object"==typeof h&&h)if("[object Array]"==u.call(h))for(f=h.length;f--;)T(h,f,e);else B(h,function(a){T(h,a,e)});return e.call(a,b,h)};r.parse=function(a,c){var e,h;b=0;J=""+a;e=P(z());"$"!=z()&&l();b=J=null;return c&&"[object Function]"==u.call(c)?S((h={},h[""]=e,h),"",c):e}}}r.runInContext=N;return r}var K=typeof define==="function"&&define.amd,F={"function":!0,object:!0},G=F[typeof exports]&&exports&&!exports.nodeType&&exports,k=F[typeof window]&&
window||this,t=G&&F[typeof module]&&module&&!module.nodeType&&"object"==typeof global&&global;!t||t.global!==t&&t.window!==t&&t.self!==t||(k=t);if(G&&!K)N(k,G);else{var L=k.JSON,Q=k.JSON3,M=!1,A=N(k,k.JSON3={noConflict:function(){M||(M=!0,k.JSON=L,k.JSON3=Q,L=Q=null);return A}});k.JSON={parse:A.parse,stringify:A.stringify}}K&&define(function(){return A})}).call(this);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
!function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var t=window.webpackJsonp;window.webpackJsonp=function(r,c,i){for(var a,u,f,s=0,l=[];s<r.length;s++)u=r[s],o[u]&&l.push(o[u][0]),o[u]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(t&&t(r,c,i);l.length;)l.shift()();if(i)for(s=0;s<i.length;s++)f=n(n.s=i[s]);return f};var r={},o={4:0};n.e=function(e){function t(){a.onerror=a.onload=null,clearTimeout(u);var n=o[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}var r=o[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var c=new Promise(function(n,t){r=o[e]=[n,t]});r[2]=c;var i=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,n.nc&&a.setAttribute("nonce",n.nc),a.src=n.p+"js/"+({0:"index",1:"vendor"}[e]||e)+".chunk."+{0:"a77a4d10943b18029be2",1:"b084d27d23fc3ff216e2"}[e]+".js";var u=setTimeout(t,12e4);return a.onerror=a.onload=t,i.appendChild(a),c},n.m=e,n.c=r,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="https://static.xuexi.cn/search/online/",n.oe=function(e){throw e}}([]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,170 @@
/*常规验证码*/
.verify-code {
font-size: 20px;
text-align: center;
cursor: pointer;
margin-bottom: 5px;
border: 1px solid #ddd;
}
.cerify-code-panel {
height:100%;
overflow:hidden;
}
.verify-code-area {
float:left;
}
.verify-input-area {
float: left;
width: 60%;
padding-right: 10px;
}
.verify-change-area {
line-height: 30px;
float: left;
}
.varify-input-code {
display:inline-block;
width: 100%;
height: 25px;
}
.verify-change-code {
color: #337AB7;
cursor: pointer;
}
.verify-btn {
width: 200px;
height: 30px;
background-color: #337AB7;
color:#FFFFFF;
border:none;
margin-top: 10px;
}
/*滑动验证码*/
.verify-bar-area {
position: relative;
background: #FFFFFF;
text-align: center;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
border: 1px solid #ddd;
-webkit-border-radius: 4px;
}
.verify-bar-area .verify-move-block {
position: absolute;
top: 0px;
left: 0;
background: #fff;
cursor: pointer;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
box-shadow: 0 0 2px #888888;
-webkit-border-radius: 1px;
}
.verify-bar-area .verify-move-block:hover {
background-color: #337ab7;
color: #FFFFFF;
}
.verify-bar-area .verify-left-bar {
position: absolute;
top: -1px;
left: -1px;
background: #f0fff0;
cursor: pointer;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
border: 1px solid #ddd;
}
.verify-img-panel {
margin:0;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
border: 1px solid #ddd;
border-radius: 3px;
position: relative;
}
.verify-img-panel .verify-refresh {
width: 25px;
height: 25px;
text-align:center;
padding: 5px;
cursor: pointer;
position: absolute;
top: 0;
right: 0;
z-index: 2;
}
.verify-img-panel .icon-refresh {
font-size: 20px;
color: #fff;
}
.verify-img-panel .verify-gap {
background-color: #fff;
position: relative;
z-index: 2;
border:1px solid #fff;
}
.verify-bar-area .verify-move-block .verify-sub-block {
position: absolute;
text-align: center;
z-index: 3;
border: 1px solid #fff;
}
.verify-bar-area .verify-move-block .verify-icon {
font-size: 18px;
}
.verify-bar-area .verify-msg {
z-index : 3;
}
/*字体图标的css*/
@font-face {font-family: "iconfont";
src: url('../fonts/iconfont.eot?t=1508229193188'); /* IE9*/
src: url('../fonts/iconfont.eot?t=1508229193188#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAaAAAsAAAAACUwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFZW7kiSY21hcAAAAYAAAAB3AAABuM+qBlRnbHlmAAAB+AAAAnQAAALYnrUwT2hlYWQAAARsAAAALwAAADYPNwajaGhlYQAABJwAAAAcAAAAJAfeA4dobXR4AAAEuAAAABMAAAAYF+kAAGxvY2EAAATMAAAADgAAAA4CvAGsbWF4cAAABNwAAAAfAAAAIAEVAF1uYW1lAAAE/AAAAUUAAAJtPlT+fXBvc3QAAAZEAAAAPAAAAE3oPPXPeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2Bk/sM4gYGVgYOpk+kMAwNDP4RmfM1gxMjBwMDEwMrMgBUEpLmmMDgwVDxbwtzwv4EhhrmBoQEozAiSAwAw1A0UeJzFkcENgCAMRX8RjCGO4gTe9eQcnhzAfXC2rqG/hYsT8MmD9gdS0gJIAAaykAjIBYHppCvuD8juR6zMJ67A89Zdn/f1aNPikUn8RvYo8G20CjKim6Rf6b9m34+WWd/vBr+oW8V6q3vF5qKlYrPRp4L0Ad5nGL8AeJxFUc9rE0EYnTezu8lMsrvtbrqb3TRt0rS7bdOmdI0JbWmCtiItIv5oi14qevCk9SQVLFiQgqAF8Q9QLKIHLx48FkHo3ZNnFUXwD5C2B6dO6sFhmI83w7z3fe8RnZCjb2yX5YlLhskkmScXCIFRxYBFiyjH9Rqtoqes9/g5i8WVuJyqDNTYLPwBI+cljXrkGynDhoU+nCgnjbhGY5yst+gMEq8IBIXwsjPU67CnEPm4b0su0h309Fd67da4XBhr55KSm17POk7gOE/Shq6nKdVsC7d9j+tcGPKVboc9u/0jtB/ZIA7PXTVLBef6o/paccjnwOYm3ELJetPuDrvV3gg91wlSXWY6H5qVwRzWf2TybrYYfSdqoXOwh/Qa8RWIjBTiSI3h614/vKSNRhONOrsnQi6Xf4nQFQDTmJE1NKbhI6crHEJO/+S5QPxhYJRRyvBFBP+5T9EPpEAIVzzRQIrjmJ6jY1WTo+NXTMchuBsKuS8PRZATSMl9oTA4uNLkeIA0V1UeqOoGQh7IAxGo+7T83fn3T+voqCNPPAUazUYUI7LgKSV1Jk2oUeghYGhZ+cKOe2FjVu5ZKEY2VkE13AK1+jI4r1KLbPlZfrKiPhOXKPRj7q9sj9XJ7LFHNmrKJS3VCdhXGSdKrtmoQaWeMjQVt0KD6sGPOx0oH2fgtzoNROxtNq8F3tzYM/n+TjKSX5qf2jx941276TIr9FjXxKr8eX/6bK4yuopwo9py1sw8F9kdw4AmurRpLUM3tYx5ZnKpfHPi8dzz19vJ6MjyxYUrpqeb1uLs3eGV6vr21pSqpeWkqonAN9oUyIiXpv8XvlN5e3icY2BkYGAA4n0vN4fG89t8ZeBmYQCBa9wPPRH0/wcsDMwmQC4HAxNIFABAfAqaAHicY2BkYGBu+N/AEMPCAAJAkpEBFbABAEcMAm94nGNhYGBgfsnAwMKAigESnwEBAAAAAAAAdgCkANoBCAFsAAB4nGNgZGBgYGMIZGBlAAEmIOYCQgaG/2A+AwARSAFzAHicZY9NTsMwEIVf+gekEqqoYIfkBWIBKP0Rq25YVGr3XXTfpk6bKokjx63UA3AejsAJOALcgDvwSCebNpbH37x5Y08A3OAHHo7fLfeRPVwyO3INF7gXrlN/EG6QX4SbaONVuEX9TdjHM6bCbXRheYPXuGL2hHdhDx18CNdwjU/hOvUv4Qb5W7iJO/wKt9Dx6sI+5l5XuI1HL/bHVi+cXqnlQcWhySKTOb+CmV7vkoWt0uqca1vEJlODoF9JU51pW91T7NdD5yIVWZOqCas6SYzKrdnq0AUb5/JRrxeJHoQm5Vhj/rbGAo5xBYUlDowxQhhkiMro6DtVZvSvsUPCXntWPc3ndFsU1P9zhQEC9M9cU7qy0nk6T4E9XxtSdXQrbsuelDSRXs1JErJCXta2VELqATZlV44RelzRiT8oZ0j/AAlabsgAAAB4nGNgYoAALgbsgI2RiZGZkYWRlZGNkZ2BsYI1OSM1OZs1OSe/OJW1KDM9o4S9KDWtKLU4g4EBAJ79CeQ=') format('woff'),
url('../fonts/iconfont.ttf?t=1508229193188') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('../fonts/iconfont.svg?t=1508229193188#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
font-family:"iconfont" !important;
font-size:16px;
font-style:normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-check:before { content: "\e645"; }
.icon-close:before { content: "\e646"; }
.icon-right:before { content: "\e6a3"; }
.icon-refresh:before { content: "\e6a4"; }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -1,77 +1,8 @@
# 核心爬虫库
requests # HTTP请求库
beautifulsoup4 # HTML/XML解析库
lxml # 高性能HTML/XML解析器
selenium # 浏览器自动化(用于动态页面)
scrapy # 专业爬虫框架(可选)
crawl4ai # 基于 Playwright 的智能爬虫框架
playwright # 浏览器自动化框架Crawl4AI 依赖)
# 异步支持
aiohttp # 异步HTTP客户端
asyncio # 异步IO支持
httpx # 现代HTTP客户端支持异步
# 数据校验与类型检查
pydantic # 数据验证和设置管理
pydantic-settings # Pydantic配置管理
typing-extensions # 类型注解扩展
mypy # 静态类型检查器
# 数据处理
pandas # 数据分析和处理
openpyxl # Excel文件读写
python-dateutil # 日期时间处理
pytz # 时区处理
# 日志与调试
loguru # 现代化日志库
colorlog # 彩色日志输出
# 配置管理
python-dotenv # 环境变量管理
pyyaml # YAML配置文件支持
# 数据库连接(用于存储爬取的数据)
pymysql # MySQL数据库连接
sqlalchemy # ORM框架
# HTTP客户端增强
urllib3 # HTTP库
certifi # SSL证书
charset-normalizer # 字符编码检测
# HTML处理增强
html5lib # HTML5解析器
cssselect # CSS选择器
# 反爬虫对策
fake-useragent # 随机User-Agent
pyquery # jQuery风格的HTML解析
# 图片处理(如果需要下载图片)
Pillow # 图像处理库
# 网络工具
chardet # 字符编码检测
# 定时任务如果Python端需要独立运行
schedule # 简单的定时任务库
apscheduler # 高级定时任务调度器
# WebDriver管理自动下载浏览器驱动
webdriver-manager # 自动管理Selenium WebDriver
# JSON处理增强
jsonschema # JSON数据验证
# 代理支持
pysocks # SOCKS代理支持
# 开发工具
pytest # 测试框架
pytest-asyncio # 异步测试支持
black # 代码格式化
flake8 # 代码风格检查
isort # import排序
beautifulsoup4==4.14.2
chardet==5.2.0
crawl4ai==0.7.6
loguru==0.7.3
pydantic==2.12.4
pydantic_settings==2.12.0
Requests==2.32.5
selenium==4.38.0