lazyad 0.0.29__py3-none-any.whl → 0.0.31__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of lazyad might be problematic. Click here for more details.

@@ -401,7 +401,7 @@ def update_creative_batch(
401
401
  cookie,
402
402
  media_type: str,
403
403
 
404
- creative_ids: int = None,
404
+ creative_ids: list = None,
405
405
  advertiser_ids: list = None,
406
406
 
407
407
  operate: str = "creative_disable"
@@ -557,3 +557,96 @@ def get_material_report(
557
557
  json=data,
558
558
  headers=headers
559
559
  )
560
+
561
+
562
+ def get_account_report(
563
+ cookie: str,
564
+ media_type: str,
565
+ start_date: str = None,
566
+ end_date: str = None,
567
+ page: int = 1,
568
+ page_size: int = 20,
569
+ sort_field: str = "cost",
570
+ sort_direction: str = "desc",
571
+ data_type: str = "list",
572
+ conditions: dict = None,
573
+ kpis: list = None,
574
+ base_infos: list = None,
575
+ time_line: str = "REPORTING_TIME"
576
+ ):
577
+ """
578
+ 推广-广告管理-媒体账户
579
+ :param cookie:
580
+ :param start_date: 数据开始日期,默认为当日
581
+ :param end_date: 数据结束日期,默认为当日
582
+ :param page: 页码
583
+ :param page_size: 每页数量
584
+ :param media_type: 媒体:gdt_upgrade|腾讯广告3.0,
585
+ :param sort_field: 排序字段
586
+ :param sort_direction: 排序方式,desc降序
587
+ :param data_type:
588
+ :param conditions: 搜索条件
589
+ :param kpis: 需要获取的字段
590
+ :return:
591
+ """
592
+ if not start_date:
593
+ start_date = lazytime.get_date_string(days=0)
594
+ if not end_date:
595
+ end_date = lazytime.get_date_string(days=0)
596
+ url = "https://cli2.mobgi.com/MainPanelReport/AccountReport/getReport"
597
+ data = {
598
+ "data_type": data_type,
599
+ "media_type": media_type,
600
+ "sort_field": sort_field,
601
+ "sort_direction": sort_direction,
602
+ "page": page,
603
+ "page_size": page_size,
604
+ "start_date": start_date,
605
+ "end_date": end_date,
606
+ "time_line": time_line
607
+ }
608
+ if media_type == "gdt_upgrade":
609
+ if not conditions:
610
+ conditions = {
611
+ "keyword": "",
612
+ "owner_user_id": [],
613
+ "company": [],
614
+ "media_project_id": [],
615
+ "balance": "",
616
+ "time_line": "REPORTING_TIME"
617
+ }
618
+ if not kpis:
619
+ kpis = [
620
+ "cost",
621
+ "thousand_display_price",
622
+ "cpc",
623
+ "conversions_count",
624
+ "conversions_cost",
625
+ "from_follow_uv",
626
+ "from_follow_cost",
627
+ "cheout_fd"
628
+ ]
629
+ if not base_infos:
630
+ base_infos = [
631
+ "advertiser_id",
632
+ "advertiser_nick",
633
+ "user_name",
634
+ "advertiser_name",
635
+ "balance",
636
+ "daily_budget"
637
+ ]
638
+ else:
639
+ showlog.warning("未知媒体类型")
640
+ return
641
+
642
+ headers = copy.deepcopy(default_headers)
643
+ headers["Cookie"] = cookie
644
+ data["conditions"] = conditions
645
+ data["kpis"] = kpis
646
+ data["base_infos"] = base_infos
647
+ return lazyrequests.lazy_requests(
648
+ method="POST",
649
+ url=url,
650
+ json=data,
651
+ headers=headers
652
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lazyad
3
- Version: 0.0.29
3
+ Version: 0.0.31
4
4
  Summary: 基于Python的懒人包-适用于广告投放模块
5
5
  Home-page: https://gitee.com/ZeroSeeker/lazyad
6
6
  Author: ZeroSeeker
@@ -1,11 +1,11 @@
1
1
  lazyad/__init__.py,sha256=tnVTFEgdzgMWQI0mZqy3DAueMJjpypPb15DdxJ-9TiU,41
2
2
  lazyad/crawlers/__init__.py,sha256=GK3GGpiUJbESc1uGTwSmEnsSUwYDNZfJCxeLYB4CpS4,68
3
- lazyad/crawlers/chuangliang.py,sha256=-QtnKQ4ZAYn5YnVqihfhIs6wR7uZCZ5gvO13TS5P-Wc,16799
3
+ lazyad/crawlers/chuangliang.py,sha256=A0cM_h0VjY1c2OCjZTplCzOGSZroQGFFY3m9v_W4yGA,19541
4
4
  lazyad/crawlers/oceanengine.py,sha256=kjBEpCb_h5OpodCTqzvXd5MBBwAuw3Oq5UKWoTCXrQM,4540
5
5
  lazyad/crawlers/qq.py,sha256=mAVOP1TOGVD1juu77uKBauN7vLymukTJ1mJ8uyRh9a8,3230
6
6
  lazyad/open/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  lazyad/open/qq.py,sha256=B6HWnBmtF3mbpwto1wqi7j-auK73Kzp8ESxeUpvLHRA,4391
8
- lazyad-0.0.29.dist-info/METADATA,sha256=xxr7dYz7aqjIIRRtDqAsO9NnoSgk1YxonkohF0D3z2c,1695
9
- lazyad-0.0.29.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
10
- lazyad-0.0.29.dist-info/top_level.txt,sha256=RAPjtj4gZYpsKAM3fAQrWyyn84xjdRuaiUS76gx6eNs,7
11
- lazyad-0.0.29.dist-info/RECORD,,
8
+ lazyad-0.0.31.dist-info/METADATA,sha256=O7FikGDmFSBipP2ge7Nlxcjr4VGIcLrYCbaR5Kkhjxk,1695
9
+ lazyad-0.0.31.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
10
+ lazyad-0.0.31.dist-info/top_level.txt,sha256=RAPjtj4gZYpsKAM3fAQrWyyn84xjdRuaiUS76gx6eNs,7
11
+ lazyad-0.0.31.dist-info/RECORD,,