Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
CorttChan committed Oct 8, 2022
2 parents 2df9299 + 2042e63 commit 02f2329
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
16 changes: 6 additions & 10 deletions archoctopus/plugins/pinterest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"""

# name: pinterest.py
# version: 0.0.5
# date: 2022/09/08 17:00
# version: 0.0.6
# date: 2022/09/28 17:00
# desc:

import json
Expand Down Expand Up @@ -737,29 +737,29 @@ def route(self, *args, **kwargs) -> [typing.Callable, None]:

# https://www.pinterest.com/kane8616/_saved/
elif re.match("/(?!search|pin)[^/]*/_saved/?$", url_path):
result = re.search("/([^/]*)/_saved/?", self.url)
result = re.search("/([^/]*)/_saved/?", url_path)
username = result.group(1)
self.task_name = f"People-\'{username}\'"
return self.call_parse(self.parse_people_saved)

# https://www.pinterest.com/corttchan/render/
elif re.match("/(?!search|pin)[^/]*/[^/]+/?$", url_path):
result = re.search("/([^/]*)/([^/]+)/?$", self.url)
result = re.search("/([^/]+)/([^/]+)/?$", url_path)
username = result.group(1)
slug = unquote(result.group(2))
self.task_name = f"Board-\'{username}-{slug}\'"
return self.call_parse(self.parse_board, username=username, slug=slug)

# https://www.pinterest.com/kane8616/_created/
elif re.match("/(?!search|pin)[^/]+/_created/?$", url_path):
result = re.search("/([^/]*)/_saved/?", self.url)
result = re.search("/([^/]*)/_created/?", url_path)
username = result.group(1)
self.task_name = f"People-\'{username}-创建钉图\'"
return self.call_parse(self.parse_people_created)

# https://www.pinterest.com/corttchan/shopping-mall-facade/modern/
elif re.match("/(?!search|pin)[^/]*/[^/]+/[^/]+/?$", url_path):
result = re.search("/([^/]*)/([^/]+)/([^/]+)/?$", self.url)
result = re.search("/([^/]*)/([^/]+)/([^/]+)/?$", url_path)
username = result.group(1)
slug = result.group(2)
section_slug = result.group(3)
Expand All @@ -775,7 +775,3 @@ def route(self, *args, **kwargs) -> [typing.Callable, None]:
# # https://www.pinterest.com/corttchan/design-tmp/_tools/organize/?organization_feed=False
# elif re.match(".*?/_tools/organize/?$", url_path):
# return self.parse_organize


if __name__ == '__main__':
pass
2 changes: 1 addition & 1 deletion update/plugin_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"archcollege.py": "0.0.1", "archdaily.py": "0.0.1", "artstation.py": "0.0.1", "behance.py": "0.0.1", "gooood.py": "0.0.2", "huaban.py": "0.0.4", "ikuku.py": "0.0.1", "pinterest.py": "0.0.5", "shows_vogue.py": "0.0.1", "vogue.py": "0.0.1", "zcool.py": "0.0.2", "__init__.py": "0.0.2"}
{"archcollege.py": "0.0.1", "archdaily.py": "0.0.1", "artstation.py": "0.0.1", "behance.py": "0.0.1", "gooood.py": "0.0.2", "huaban.py": "0.0.4", "ikuku.py": "0.0.1", "pinterest.py": "0.0.6", "shows_vogue.py": "0.0.1", "vogue.py": "0.0.1", "zcool.py": "0.0.2", "__init__.py": "0.0.2"}

0 comments on commit 02f2329

Please sign in to comment.