#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# Author: CCCCold丶kl
import json
import time
import random
import datetime
import requests
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
from tkinter import *
from urllib import error
from urllib.parse import *
from lxml import etree
from requests.packages import urllib3
urllib3.disable_warnings()
now_date = time.strftime("%Y-%m-%d", time.localtime(time.time()))
now_time = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime(time.time()))
phone_list = [
18303517744,
13613416611,
15219466201,
15036222256,
18438888133,
18876941131,
18876622089,
18889262767,
13715150077,
13717033838,
18351078990,
13467719111,
15997693333,
13730600607,
13699051071,
13849038741,
18352936688,
13880888292,
18822441999,
15777770130,
15777772845,
13727693111,
13632577333,
15976856868,
18222167181,
13512960022,
13530102266,
18300666187,
15824817777,
18349333171,
13838555227,
15890005577,
15890008887,
13838200888,
13924853168,
18822488887,
13972911999,
13428334566,
13566102222,
13732097555,
15233333323,
13682987828,
13923918859,
18859981392,
15818692899,
15012563066,
18222522000,
13828716737,
13692298935,
13706053195,
13887441413,
18322040999,
13911336673,
13801391870,
13433196988,
13702485588,
13924578588,
13924852345,
18823143456,
13637666699,
13755630022,
13920593529,
18702888838,
15198120000,
13908057178,
18844227188,
18750468844,
13505952075,
15768179999,
18356194521,
13696754521,
13788829706,
15208275054,
18777770214,
13551275898,
18280151115,
13677777254,
18769721000,
18897777726,
15814226133,
15918128980,
15918129083,
15918129282,
15918129090,
18300077779,
15022277000,
15875766666,
18428088892,
15703382298,
15131712232,
15732922520,
13874677777,
18255555551,
18393897777,
15180222225,
13505740467,
13780390000,
18859567892,
15277775445,
13662688881,
18213777222,
13761746746,
15000505062,
14761188884,
13809070207,
13818357698,
13873179698,
18817871288,
15112998888,
15703361816,
15290911121,
15107555885,
18396217171,
13825876548,
13619870320,
13778891234,
13548291222,
18282200022,
18402898980,
18328025788,
15228886138,
17878781118,
15123888444,
15837182792,
15838125087,
18703896718,
18736011629,
18839781750,
18837170569,
15777776964,
18761755000,
18751373210,
15962711155,
15962792088,
18761755088,
13656291113,
18862779378,
15190971978,
13777888585,
15068936333,
15204025988,
13654059991,
15775677700,
13684218789,
15281898765,
13616202666,
18751126999,
13812920788,
13809055222,
13962350777,
18353240966,
18853296464,
17839929705,
18838967382,
18749418806,
15093239328,
15188349522,
18236956924,
18348405579,
15093334268,
13505647555,
15220525678,
15020050513,
15020030417,
15267701717,
15088931331,
15906878938,
13646514938,
13706636314,
18867793298,
13739742666,
15731102345,
13859652222,
18232102678,
13601261337,
15231099666,
18337728521,
15203802168,
18331758666,
18736599499,
13930109099,
15738888289,
15738888538,
15738888576,
15738888697,
15738888963,
13797904444,
15243191111,
18405311888,
18405311888,
13791080000,
13791080000,
13908376207,
13908335110,
13908374332,
18702397333,
18702379555,
15922584000,
13783666664,
18335392777,
15217430000,
15992225679,
13585510688,
15818991889,
17806722226,
13536565653,
18738651999,
18388555511,
15825022222,
15882234084,
13776268888,
15018310888,
15113133313,
13701097729,
15726835666,
15058299222,
15118444415,
18820300009,
18825700007,
13829111788,
13825766788,
13480423333,
13711888886,
13532923333,
13825737888,
13537328888,
13686678888,
13538345678,
15016967488,
15917735557,
15217104555,
15917669777,
15017888444,
15931390000,
15267180777,
15068793333,
18335156789,
13835175177,
18202468383,
13926787833,
15815100303,
15892056631,
13599305858,
13616979898,
13511100900,
13786766667,
13686868538,
13632878899,
13883038222,
18838200011,
13911672661,
13521935222,
13802289678,
13728888822,
13801507158,
15093939323,
15160299539,
18831119031,
13974259999,
15807539093,
15023669066,
13785811099,
18716433334,
18834845999,
13507170130,
13507115301,
13995588392,
13657247111,
17839999122,
17839993883,
13807196657,
13807197319,
13807198517,
13807153256,
13807190231,
13908631578,
13908863082,
18822858108,
13510308789,
13510102070,
18419521214,
13877853333,
18351203222,
18261197555,
15815285757,
15261115522,
13903173981,
15132755552,
15019677099,
18862192899,
13678863811,
13983652278,
13856977511,
13589966223,
18337623210,
13979673333,
15007927777,
18837744446,
13950654999,
13861186488,
18870000005,
15158172221,
15824107733,
13790746666,
15802648889,
13808322226,
15823513000,
18883190766,
18883298278,
18375801115,
18375702233,
15023871222,
13779033333,
18872855555,
18270003333,
18886889988,
15777777783,
18881111115,
18882888802,
14799448888,
13688819128,
13688819693,
]
user_agent_m = [
'Mozilla/5.0 (Linux; Android 8.1; PAR-AL00 Build/HUAWEIPAR-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/6.2 TBS/044304 Mobile Safari/537.36 MicroMessenger/6.7.3.1360(0x26070333) NetType/WIFI Language/zh_CN Process/tools',
'Mozilla/5.0 (Linux; Android 8.1; EML-AL00 Build/HUAWEIEML-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.143 Crosswalk/24.53.595.0 XWEB/358 MMWEBSDK/23 Mobile Safari/537.36 MicroMessenger/6.7.2.1340(0x2607023A) NetType/4G Language/zh_CN',
'Mozilla/5.0 (Linux; Android 8.0; MHA-AL00 Build/HUAWEIMHA-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/6.2 TBS/044304 Mobile Safari/537.36 MicroMessenger/6.7.3.1360(0x26070333) NetType/4G Language/zh_CN Process/tools',
'Mozilla/5.0 (Linux; Android 5.1.1; vivo X6S A Build/LMY47V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/6.2 TBS/044207 Mobile Safari/537.36 MicroMessenger/6.7.3.1340(0x26070332) NetType/4G Language/zh_CN Process/tools'
]
ip_origin = ["中国联通", "中国移动", "中国电信"]
c_devmodel_list = ['Mate10', 'P8青春', '荣耀7i', '畅玩7A', '荣耀8XMax',
'Mate10Pro', '荣耀10', 'M3青春', '荣耀8青春']
class CrawlCompareWeb:
"""
比价网反爬严格,考虑换ip突破,此条有待考证
另一个查询历史价格接口:http://tool.manmanbuy.com/history.aspx?DA=1&action=gethistory&url=http%3a%2
f%2fitem.tmall.com%2fitem.htm%3fid%3d532034800285&bjid=&spbh=&cxid=&zkid=&w=350&token=
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
利用Python实现GUI编程,通过构造不用类,实现定向抓取淘宝商品、每日优鲜商品、比价网商品、天猫超市商品来获取目标商品最新价格、优惠、销量信息。程序内附一定反爬技术。以上全部基于移动端抓取实现。 打包利用--pyinstaller
资源推荐
资源详情
资源评论
收起资源包目录
1088520.zip (1个子文件)
1088520.py 69KB
共 1 条
- 1
资源评论
- pywuhen2022-10-18资源使用价值高,内容详实,给了我很多新想法,感谢大佬分享~
- 老王plus12023-11-01这个资源值得下载,资源内容详细全面,与描述一致,受益匪浅。
处处清欢
- 粉丝: 2085
- 资源: 2863
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功