当前位置:网站首页>php写一个购买全网最低价的纸尿裤
php写一个购买全网最低价的纸尿裤
2022-07-29 05:19:00 【廖圣平】
家里有小宝的都知道,小孩一生下来,就要考虑囤纸尿裤了,要在恰当的时间买才能买到,相对实惠的价钱。
商家在不断的在发布营销策略,什么满300减60 ,然后把价钱提上去,达到营销效果。
我老婆为此加入了很多宝妈群,天天跟我说,现在做活动呀,满50减10块 满150减40呀,优惠很大呀,于是我打开购物软件,查看历史数据。其实没有便宜,平常也能买到的价钱呀
于是作为程序员的我,搞一个程序去抓商品,然后计算最优购买数量,真正优惠的时候发一个邮箱给我,岂不是美哉!!
收集各大商城的商品,不是一件很好的差事,因为这些商城都没有提供一个完美的接口,需要自己去研究,有的需要通过网页正则收取数据,再去请求接口。有的接口需要cookie才能抓取。
省钱,给我很大的动力,意味着程序可能不能为我赚钱,但是实实在在的能为我省钱。
程序用php抓取,用 dcat-admin 做后台管理,方便我自己添加商品和sku,还有商品本身的信息。比如把纸尿裤价钱单位改成元。
这样我就清晰明了,什么商品扣除七七八八的优惠券或者促销之外,真实的价钱是多少,给自己一个参考。
通过邮箱,查看降价的商品,后面再写一个阀值吧,比如降到了 多少钱之后,再发信息。
邮箱是通过 Laravel-MailEclipse邮箱管理的使用
ok 功能已经实现了,但是我老婆总是觉得我的程序不靠谱,不直观,不一目了然。
那应该她想的是和谷歌购物插件一样,通过曲线图,查看价格区间,跟看A股大盘走势吧。
于是学了下怎么画原型图,这段时间比较不忙,可以折腾折腾前端。
可以熟悉熟悉正则,又可以练练前端,这还挺有趣的。接下去能接触的应该是uniapp ,还有推送,或者用serveless 做接口,欢迎程序员爸爸讨论谈论
边栏推荐
- Day 3
- js简单代码判断打开页面的设备是电脑PC端或手机H5端或微信端
- The function of using wechat applet to scan code to log in to the PC web of the system
- Clickhouse learning (VII) table query optimization
- Detailed installation and use tutorial of MySQL (nanny installation with pictures and texts)
- uniapp之常用提示弹框
- Wechat applet - screen height
- 2022 mathematical modeling competition summer training lecture - optimization method: goal planning
- [C language series] - three methods to simulate the implementation of strlen library functions
- Abstract classes and interfaces
猜你喜欢
表格与表单相关知识点总结
Detailed installation and use tutorial of MySQL (nanny installation with pictures and texts)
Realize simple database query (incomplete)
Qt设置背景图片方法
公众号不支持markdown格式文件编写怎么办?
Win10 搭建MSYS2环境
365 day challenge leetcode 1000 questions - day 035 one question per day + two point search 13
Wapiti是什么以及使用教程
【TypeScript】深入学习TypeScript对象类型
HCIA-R&S自用笔记(27)综合实验
随机推荐
uniapp组件之选择选项(如套餐选择)
How does the MD editor of CSDN input superscripts and subscripts? The input method of formula and non formula is different
[C language series] - string + partial escape character explanation + annotation tips
Common shortcut keys for Ad
Playwright实战案例之爬取js加密数据
Provincial and urban three-level linkage (simple and perfect)
重绘与回流的关系
[C language series] - realize the exchange of two numbers without creating the third variable
实现table某个单元格背景色设置
table中同一列中合并相同项
[C language series] - storage of deep anatomical data in memory (I) opening of summer vacation
Sqlmap是什么以及使用方法
【无标题】
Do students in the science class really understand the future career planning?
解决表单校验提示信息不消失问题以及赋值不生效问题
HCIA-R&S自用笔记(24)ACL
Relationship between redrawing and reflow
Pyqt5: Chapter 1, Section 1: creating a user interface using QT components - Introduction
个人学习笔记
Basic concepts of MySQL + database system structure + extended application + basic command learning