diff --git a/.gitignore b/.gitignore index 3cc6e71..e1b5829 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ dbs/* venv/* __pycache__/ *.pyc -summary*.md twistd.pid ~$* *.xlsx diff --git a/count.py b/count.py index 3a63f9e..f13df1c 100644 --- a/count.py +++ b/count.py @@ -7,7 +7,7 @@ def count_web(): web_dir = os.path.join(current_dir, 'web_dir') for file in os.listdir(web_dir): try: - df = pd.read_csv(os.path.join(web_dir, file), encoding='gb18030') + df = pd.read_excel(os.path.join(web_dir, file)) except pd.errors.EmptyDataError: pass total = total + len(df) @@ -15,7 +15,7 @@ def count_web(): return total def count_wechat(): - articles_full_path = os.path.jon(current_dir, 'wechat_dir/articles_full.csv') + articles_full_path = os.path.join(current_dir, 'wechat_dir/articles_full.csv') df = pd.read_csv(articles_full_path) return len(df) print(count_web(), count_wechat()) \ No newline at end of file diff --git a/summary/summary juin.md b/summary/summary juin.md new file mode 100644 index 0000000..a023b94 --- /dev/null +++ b/summary/summary juin.md @@ -0,0 +1,25 @@ +# 项目总结2023.6 + +爬取时间为6月5-9日, 分析时间为6月12-13 日 + +## 涉及单位 + +目前爬取并分析了阵地类型为官方网站、微信公众号两种类型的数据,其中官网网站69个(成功爬取63个),微信公众号102个。 +其中官方网站爬取了同域名下所有链接地址,微信公众号爬取了历史所有文章。 +共爬取网页数量27876页,公众号文章4153篇 + +## 分析结果 + +根据分析要求进行得到分析结果,具体见结果表 + +## 存在问题 + +目前存在部分网站因反爬措施或无法访问或技术原因,未获取到数据,见下表 +| 单位 | 可能原因 | +| ---- | ---- | +| 中国建筑材料科学研究总院有限公司_http://www.cbma.com | 网址错误 | +| 对比服务平台_http://www.ctc-online.cn/companyLogin?company | 网站需登录 | +| 中国建材检验认证集团江苏有限公司_http://www.ctcjs.com | 不能访问 | +| 乌鲁木齐京诚检测技术有限公司_http://www.wlmqjc.cn/ | 网站域名过期 | +| 中材江西电瓷电气有限公司_http://www.sinoma-insulator.com | 不能访问 | +| 中国新型建材设计研究院有限公司_http://www.cnhdi.com/ | 不能访问 | \ No newline at end of file diff --git a/summary/summary.md b/summary/summary.md new file mode 100644 index 0000000..877b055 --- /dev/null +++ b/summary/summary.md @@ -0,0 +1,24 @@ +# 项目总结2023.5 + +爬取时间为4月24-28日, 分析时间为5月4-5日 + +## 涉及单位 + +目前爬取并分析了阵地类型为官方网站、微信公众号二种类型的数据,其中官网网站58个,微信公众号89个。 +其中官方网站爬取了同域名下所有链接地址,微信公众号爬取了历史所有文章。 +共爬取网页数量118526页,公众号文章4904篇 + +## 分析结果 + +根据分析要求进行得到分析结果,具体见结果表 + +## 存在问题 + +目前存在部分网站因反爬措施或无法访问或技术原因,未获取到数据,见下表 +| 单位 | 可能原因 | +| ---- | ---- | +| 中材高新材料股份有限公司_www.zoomber.com | 无法访问 | +| 中国国检测试控股集团咸阳有限公司_www.cnmpi.net | 爬虫限制 | +| 南京国材检测有限公司_www.ctcnj.net | 单页面应用 | +| 国检测试控股集团安徽元正检测有限公司_www.ctc-yz.com | 爬虫限制 | +| 中国国检测试控股集团陕西有限公司_www.ceramictest.com | 爬虫限制 | \ No newline at end of file diff --git a/summary/summary.pdf b/summary/summary.pdf new file mode 100644 index 0000000..84748ab Binary files /dev/null and b/summary/summary.pdf differ diff --git a/summary/summary_juin.pdf b/summary/summary_juin.pdf new file mode 100644 index 0000000..29fd746 Binary files /dev/null and b/summary/summary_juin.pdf differ