首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏Java成长之路

    枚举enum基本特性

    下面例子演示了Enum的一些功能: enum Shrubbery { GROUND, CRAWLING, HANGING } public class EnumClass { public static ) + " "); System.out.print(s.equals(Shrubbery.CRAWLING) + " "); System.out.println(s == Shrubbery.CRAWLING -------------"); } // Produce an enum value from a string name: for(String s : "HANGING CRAWLING ordinal: 1 0 true true class Shrubbery CRAWLING ———— HANGING ordinal: 2 1 false false class Shrubbery HANGING ———— HANGING CRAWLING GROUND Enum常用方法介绍: enum

    70910发布于 2018-09-29
  • 来自专栏捡田螺的小男孩

    掌握Java枚举这几个知识点,日常开发就够啦

    (Shrubbery.valueOf("CRAWLING")); } } 运行结果: GROUND ordinal is 0 ,equal result is false,compare result is 1 CRAWLING ordinal is 1 ,equal result is true,compare result is 0 HANGING ordinal is 2 ,equal result is false,compare result is -1 CRAWLING 三、枚举类的真面目 枚举类型到底是什么类呢? (s1),result: "+Shrubbery.CRAWLING.equals(s1)); System.out.println("Shrubbery.CRAWLING.equals(s2),result Shrubbery.CRAWLING.equals(s1),result: true Shrubbery.CRAWLING.equals(s2),result: false 可以发现不管用=

    1.1K20发布于 2020-04-15
  • 提高数据抓取效率:Swift中Crawler的并发管理

    crawler.start { result in switch result { case .success(let response): print("Crawling finished : \(response.statusCode)") case .failure(let error): print("Crawling failed: \(error.localizedDescription maxConcurrentRequests: 10)crawler.start { result in switch result { case .success(let response): print("Crawling finished: \(response.statusCode)") case .failure(let error): print("Crawling failed: \(error.localizedDescription

    76310编辑于 2024-06-06
  • 来自专栏青笔原创

    python 自动抓取分析房价数据——安居客版

    if not data_page: break data_raw += data_page print('crawling 7Cwww.google.com%7C%7C%7C%7C%23%23PcwYzNJmsyogWc2ohLkJ8TYAknaOVFpc%23' data_raw = crawl_all_page(cookie) crawling 1th page ... crawling 2th page ... crawling 3th page ... crawling 4th page ... crawling 5th page ... crawling 6th page ... crawling 7th page ... crawling 8th page ... crawling 9th page ... crawl 9 pages if not data_page: break data_raw += data_page print('crawling

    3.7K10发布于 2019-10-23
  • 【周练】 几何水题 (水)

    几何水题 Crawling in process... Crawling failed Time Limit:500MS     Memory Limit:32768KB     64bit IO Format:%lld & %llu Description

    23110编辑于 2025-08-26
  • 来自专栏PHPer 进击

    python小应用-博客园隐藏的小秘密及各类排行榜【附源码】

    一番折腾,终于按小时分段,获取到了第一页博文的浏览量和评论量: import requests import re import json import time CRAWLING_URL = 'https ://www.cnblogs.com/' def downloadPage(): """获取页面内容""" print('获取页面内容用时') url = CRAWLING_URL CRAWLING_URL = 'https://www.cnblogs.com/#p' def crawlData(page, data): url = CRAWLING_URL + str(page CRAWLING_URL = 'https://www.cnblogs.com/mvc/AggSite/PostList.aspx' def crawlData(page, data): "" "获取页面内容""" url = CRAWLING_URL headers = { 'Content-Type': 'application/json', }

    77930发布于 2019-04-11
  • 来自专栏学无止境

    Python爬虫实例:爬取B站《工作细胞》短评——异步加载信息的爬取

    media_id=102392&folded=0&page_size=20&sort=0' crawling(url) def crawling(url): print(f'正在爬取 =0&page_size=20&sort=0&cursor={json_content["result"]["list"][-1]["cursor"]}' time.sleep(1) crawling

    92230发布于 2019-01-22
  • 【周练】 求导

    求导 Crawling in process... Crawling failed Time Limit:2000MS     Memory Limit:32768KB     64bit IO Format:%lld & %llu Description

    20510编辑于 2025-08-26
  • 来自专栏luozhiyun的技术学习

    python学习要点(二)

    我们先来看一个例子: import asyncio async def crawl_page(url): print('crawling {}'.format(url)) sleep_time url_1 crawling url_2 crawling url_3 crawling url_4 OK url_1 OK url_2 OK url_3 OK url_4 Wall time: 3.99 import asyncio async def crawl_page(url): print('crawling {}'.format(url)) sleep_time = int tasks) %time asyncio.run(main(['url_1', 'url_2', 'url_3', 'url_4'])) ########## 输出 ########## crawling url_1 crawling url_2 crawling url_3 crawling url_4 OK url_1 OK url_2 OK url_3 OK url_4 Wall time: 4.01

    58630发布于 2020-04-14
  • 来自专栏Python爬虫与算法进阶

    Scrapy源码(2)——爬虫开始的地方

    一般来说,运行Scrapy项目的写法有,(这里不考虑从脚本运行Scrapy) Usage examples: $ scrapy crawl myspider [ ... myspider starts crawling ... ] $ scrapy runspider myspider.py [ ... spider starts crawling ... ] 但是更好的写法是,新建一个Python文件,如下,(便于调试 Windows NT 5.1)' }) process.crawl(MySpider) process.start() # the script will block here until the crawling Scrapy is responsible of using it accordingly) unless writing scripts that manually handle the crawling

    1.2K30发布于 2018-04-04
  • 来自专栏小徐学爬虫

    异步并发×编译性能:Dart爬虫的实战突围

    maxConcurrent))); try { final url = '$baseUrl/catalogue/page-$page.html'; print(' Crawling 数据源2、电商价格监控:并发监控数百商品页面3、内容聚合应用:Flutter应用内嵌的爬虫模块4、中等规模数据采集:每日10万级以下数据量5、需要编译部署的任务:导出独立二进制文件到服务器运行效果: Crawling page 1: https://books.toscrape.com/catalogue/page-1.html Crawling page 2: https://books.toscrape.com

    30110编辑于 2025-08-12
  • 【CodeForces】606A - Magic Spheres(水)

    Magic Spheres Crawling in process... Crawling failed Time Limit: 2000 MS Memory Limit: 262144 KB 64bit IO Format: %I64d & %I64u

    18010编辑于 2025-08-26
  • 【CodeForces】609B - The Best Gift(水)

    The Best Gift Crawling in process... Crawling failed Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit

    24010编辑于 2025-08-26
  • 【hdu】1241-Oil Deposits(DFS)(水)

    Oil Deposits Crawling in process... Crawling failed Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit

    25210编辑于 2025-08-26
  • 来自专栏JackieZheng

    Java豆瓣电影爬虫——减少与数据库交互实现批量插入

    最终发现问题的原因是对于种子网址并没有存储到mysql的record表中,所以在DoubanCrawler类中 //set boolean value "crawled" to true after crawling rs.next()) { url = rs.getString(2); } else { //stop crawling if reach the bottom of the list break; } //set a limit of crawling DouBanHttpGetUtil.getByString(urlList, conn); count++; //set boolean value "crawled" to true after crawling rs.getString(2); urlList.add(url); } //set a limit of crawling

    1.3K72发布于 2018-01-16
  • 来自专栏全栈程序员必看

    robots.txt_Robots.txt:互联网幕后的一瞥「建议收藏」

    But web crawling can also be used for more nefarious purposes. Given the slew of circumstances surrounding when web crawling is and isn’t appropriate, it’s probably uses a text file called “robots.txt” to list the parts of a site that are and aren’t available for crawling If the line reads User-agent: * as it does above, the exclusion standards apply to all bots crawling If the file doesn’t exist, the entire site is considered fair game for crawling.

    79510编辑于 2022-08-31
  • 【周练】 物理题

    物理题 Crawling in process... Crawling failed Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Description

    16410编辑于 2025-08-26
  • 【周练】 数学水题

    数学水题 Crawling in process... Crawling failed Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Description

    24410编辑于 2025-08-26
  • 【CodeForces】609C - Load Balancing(水)

    Load Balancing Crawling in process... Crawling failed Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit

    28310编辑于 2025-08-26
  • 来自专栏小徐学爬虫

    增量式网络爬虫通用模板

    logger.warning(f"Failed to crawl {url}") self.queue.task_done() def start_crawling # 计算总时间 total_time = time.time() - self.stats['start_time'] logger.info(f"Crawling crawler.add_seed_urls(seed_urls) # 启动爬虫 (resume=True 可以从上次中断处继续) try: crawler.start_crawling self, url, content): # 实现自定义处理逻辑 # 例如:解析内容、存储数据等 pass启动爬虫:# 首次爬取 crawler.start_crawling (resume=False) ​ # 断点续爬 crawler.start_crawling(resume=True)查看统计信息:crawler.print_stats()数据库结构urls 表字段类型描述

    29910编辑于 2025-06-06
领券