Wordpress
Wordpress阅读器 #
基类:EventBaseReader
Wordpress 阅读器。从 Wordpress 工作区读取数据。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
url
|
str
|
WordPress 网站的基础 URL。 |
required |
username
|
Optional[str]
|
用于身份验证的WordPress用户名。 |
None
|
password
|
Optional[str]
|
用于身份验证的WordPress密码。 |
None
|
get_pages
|
bool
|
检索静态WordPress '页面'。默认为True。 |
True
|
get_posts
|
bool
|
检索WordPress的'posts'(博客条目)。默认为True。 |
True
|
additional_post_types
|
Optional[str]
|
要检索的额外文章类型的逗号分隔列表 (例如 'my-custom-page,webinars')。默认为 None。 |
None
|
workflows/handler.py 中的源代码llama_index/readers/wordpress/base.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |
load_data #
load_data() -> List[文档]
从指定的文章类型加载数据。
返回:
| 类型 | 描述 |
|---|---|
List[文档]
|
List[Document]: 文档列表。 |
workflows/handler.py 中的源代码llama_index/readers/wordpress/base.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
get_all_posts #
get_all_posts(post_type: str) -> List[dict]
检索特定类型的所有帖子,并处理分页。
workflows/handler.py 中的源代码llama_index/readers/wordpress/base.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 | |
get_posts_page #
get_posts_page(post_type: str, current_page: int = 1) -> dict
检索指定文章类型的单页文章。
workflows/handler.py 中的源代码llama_index/readers/wordpress/base.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |
选项: 成员:- WordpressReader