aioqzone 1.7.3.dev4__tar.gz → 1.7.4.dev2__tar.gz

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.
Files changed (52) hide show
  1. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/PKG-INFO +1 -1
  2. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/pyproject.toml +1 -1
  3. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/api/h5/model.py +11 -0
  4. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/model/api/__init__.py +6 -0
  5. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/model/api/profile.py +23 -2
  6. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/model/api/request.py +10 -0
  7. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/model/api/response.py +2 -16
  8. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/constant.py +1 -0
  9. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/LICENSE +0 -0
  10. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/README.md +0 -0
  11. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/__init__.py +0 -0
  12. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/api/__init__.py +0 -0
  13. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/api/h5/__init__.py +0 -0
  14. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/api/login/__init__.py +0 -0
  15. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/api/login/_base.py +0 -0
  16. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/exception.py +0 -0
  17. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/message.py +0 -0
  18. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/model/__init__.py +0 -0
  19. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/model/api/feed.py +0 -0
  20. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/model/protocol/__init__.py +0 -0
  21. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/model/protocol/config.py +0 -0
  22. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/model/protocol/entity.py +0 -0
  23. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/utils/__init__.py +0 -0
  24. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/utils/entity.py +0 -0
  25. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/utils/regex.py +0 -0
  26. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/utils/retry.py +0 -0
  27. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/aioqzone/utils/time.py +0 -0
  28. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/__init__.py +0 -0
  29. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/base.py +0 -0
  30. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/exception.py +0 -0
  31. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/message.py +0 -0
  32. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/py.typed +0 -0
  33. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/qr/__init__.py +0 -0
  34. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/qr/type.py +0 -0
  35. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/type.py +0 -0
  36. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/up/__init__.py +0 -0
  37. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/up/_model.py +0 -0
  38. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/up/captcha/__init__.py +0 -0
  39. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/up/captcha/_model.py +0 -0
  40. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/up/captcha/capsess.py +0 -0
  41. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/up/captcha/pil_utils.py +0 -0
  42. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/up/captcha/select/__init__.py +0 -0
  43. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/up/captcha/select/_types.py +0 -0
  44. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/up/captcha/slide/__init__.py +0 -0
  45. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/up/captcha/slide/_types.py +0 -0
  46. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/up/encrypt.py +0 -0
  47. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/up/h5.py +0 -0
  48. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/up/web.py +0 -0
  49. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/utils/encrypt.py +0 -0
  50. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/utils/iter.py +0 -0
  51. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/utils/jsjson.py +0 -0
  52. {aioqzone-1.7.3.dev4 → aioqzone-1.7.4.dev2}/src/qqqr/utils/net.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aioqzone
3
- Version: 1.7.3.dev4
3
+ Version: 1.7.4.dev2
4
4
  Summary: A Python wrapper for Qzone login and H5 APIs.
5
5
  Home-page: https://github.com/aioqzone/aioqzone
6
6
  License: AGPL-3.0
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "aioqzone"
3
- version = "1.7.3.dev4"
3
+ version = "1.7.4.dev2"
4
4
  description = "A Python wrapper for Qzone login and H5 APIs."
5
5
  authors = ["aioqzone <zzzzss990315@gmail.com>"]
6
6
  license = "AGPL-3.0"
@@ -127,6 +127,17 @@ class QzoneH5API:
127
127
  )
128
128
  )
129
129
 
130
+ async def get_feeds(self, uin: int, attach_info: t.Optional[str] = None) -> ProfileResp:
131
+ return await self.call(
132
+ GetFeedsApi(
133
+ params=GetFeedsParams(
134
+ hostuin=uin,
135
+ res_attach=attach_info or "",
136
+ ),
137
+ response=ProfileResp,
138
+ )
139
+ )
140
+
130
141
  async def shuoshuo(
131
142
  self, fid: str, hostuin: int, appid=311, busi_param: str = ""
132
143
  ) -> DetailResp:
@@ -53,6 +53,12 @@ class ShuoshuoApi(QzoneApi[ShuoshuoParams, DetailResp]):
53
53
  path: t.ClassVar[str] = "/webapp/json/mqzone_detail/shuoshuo"
54
54
 
55
55
 
56
+ class GetFeedsApi(QzoneApi[GetFeedsParams, ProfileResp]):
57
+ http_method: t.ClassVar[TyHttpMethod] = "GET"
58
+ host: t.ClassVar[str] = "https://mobile.qzone.qq.com"
59
+ path: t.ClassVar[str] = "/get_feeds"
60
+
61
+
56
62
  class GetCountApi(QzoneApi[GetCountParams, FeedCount]):
57
63
  http_method: t.ClassVar[TyHttpMethod] = "GET"
58
64
  host: t.ClassVar[str] = "https://mobile.qzone.qq.com"
@@ -3,7 +3,7 @@ Qzone uses different feed schemes for ``/mqzone/profile``. This module patches :
3
3
  """
4
4
  import typing as t
5
5
 
6
- from pydantic import AliasPath, BaseModel, Field, field_validator, model_validator
6
+ from pydantic import AliasPath, BaseModel, Field, HttpUrl, field_validator, model_validator
7
7
 
8
8
  from .feed import (
9
9
  CommentItem,
@@ -19,10 +19,27 @@ from .feed import (
19
19
  RightInfo,
20
20
  Share,
21
21
  ShareInfo,
22
+ UserInfo,
22
23
  removeprefix,
23
24
  )
24
25
 
25
26
 
27
+ class QzoneProfile(BaseModel):
28
+ nickname: str
29
+ face: HttpUrl
30
+
31
+ age: int = 0
32
+ gender: t.Optional[int] = None
33
+
34
+ city: str = ""
35
+ country: str = ""
36
+ province: str = ""
37
+
38
+ isFamousQzone: bool = False
39
+ is_concerned: bool = False
40
+ is_special: int
41
+
42
+
26
43
  class ProfileFeedCommon(FeedCommon):
27
44
  ugckey: str = ""
28
45
  ugcrightkey: str = ""
@@ -53,6 +70,10 @@ class HasMedia(BaseModel):
53
70
  pic: t.Optional[ProfileFeedPic] = None
54
71
 
55
72
 
73
+ class ProfileLikeInfo(LikeInfo):
74
+ likemans: t.Optional[t.List[UserInfo]] = None
75
+
76
+
56
77
  class ProfileCommentItem(CommentItem):
57
78
  commentLikekey: t.Optional[str] = None
58
79
  commentpic: t.Optional[t.List] = Field(
@@ -78,7 +99,7 @@ class ProfileFeedOriginal(HasFid, HasCommon, HasUserInfo, HasSummary, HasMedia):
78
99
 
79
100
 
80
101
  class ProfileFeedData(HasFid, HasCommon, HasSummary, HasMedia, HasUserInfo):
81
- like: LikeInfo = Field(default_factory=LikeInfo)
102
+ like: ProfileLikeInfo = Field(default_factory=ProfileLikeInfo)
82
103
 
83
104
  comment: ProfileComment = Field(default_factory=ProfileComment)
84
105
  original: t.Union[ProfileFeedOriginal, Share, None] = Field(
@@ -14,6 +14,7 @@ from .response import PicInfo, UploadPicResponse
14
14
  __all__ = [
15
15
  "QzoneRequestParams",
16
16
  "ActiveFeedsParams",
17
+ "GetFeedsParams",
17
18
  "ProfileParams",
18
19
  "ShuoshuoParams",
19
20
  "GetCountParams",
@@ -45,6 +46,15 @@ class ActiveFeedsParams(QzoneRequestParams):
45
46
  attach_info: str
46
47
 
47
48
 
49
+ class GetFeedsParams(QzoneRequestParams):
50
+ hostuin: int
51
+ res_attach: str = ""
52
+
53
+ res_type: int = 2
54
+ refresh_type: int = 2
55
+ format: str = "json"
56
+
57
+
48
58
  class ProfileParams(QzoneRequestParams):
49
59
  hostuin: int
50
60
  starttime: int = 0
@@ -14,11 +14,12 @@ from qqqr.utils.iter import firstn
14
14
  from qqqr.utils.jsjson import json_loads
15
15
 
16
16
  from .feed import FeedData
17
- from .profile import ProfileFeedData
17
+ from .profile import ProfileFeedData, QzoneProfile
18
18
 
19
19
  __all__ = [
20
20
  "QzoneResponse",
21
21
  "FeedPageResp",
22
+ "ProfileResp",
22
23
  "IndexPageResp",
23
24
  "ProfilePagePesp",
24
25
  "DetailResp",
@@ -158,21 +159,6 @@ class QzoneStatistic(BaseModel):
158
159
  shuoshuo: int = 0
159
160
 
160
161
 
161
- class QzoneProfile(BaseModel):
162
- nickname: str
163
- age: int
164
- gender: int
165
- face: HttpUrl
166
-
167
- city: str = ""
168
- country: str = ""
169
- province: str = ""
170
-
171
- isFamousQzone: bool = False
172
- is_concerned: bool = False
173
- is_special: int
174
-
175
-
176
162
  class QzoneInfo(QzoneResponse):
177
163
  count: QzoneStatistic
178
164
  cover: HttpUrl = Field(validation_alias=AliasPath("coverinfo", 0, "cover"))
@@ -41,6 +41,7 @@ class StatusCode(IntEnum):
41
41
  InvalidArguments = 7
42
42
  ForceQR = 10005
43
43
  NeedSmsVerify = 10009 # Means, notify the owner
44
+ NoMobile = 10015
44
45
  RiskyNetwork = 23003
45
46
  RateLimit = 23011
46
47
 
File without changes
File without changes