libsyn播客api
libpyn的Python项目详细描述
对于**libsyn的第三方api来说,
>
>
>
=>要想安装libpyn,请在终端上运行这个命令
``conconsole
foo@bar:$pip install libpyn
`````
*播客类<;a name=“podcast class”>;<;/a>;
使用实例声明传递到中的“libsyn”通道的链接。
``python
channel='https://therabbithole.libsyn.com/'
example=podcast(channel)
```
podcast类包含有关podcast的有用信息。
``python
example.name=podcast频道的名称
self.mp3list=剧集列表,作为词典保存的每一集的每一集
self.htmlink=\link到podcast网站的链接
```
self.mp3list中的每一本词典都包含这些键/值对:
``python
podcast={}{}{{}存储podcast信息的词典
podcast['title']=
podcast['date']=\publishi发布日期
podcast['mp3']]>podcast['mp3']]]
podcast['image']=频道徽标
````
*下载podcast
使用**download()**函数。
``python
如果未指定foldername,则它将是通道的名称。(空格用下划线代替。)
``python
path='path/to/store/mp3'
directory='/files'
示例。下载(path=path,foldername=directory)
````
*\iframes
若要获取要嵌入到网页上的最新剧集的iframes,请使用**iframes()函数。
关键是事件的标题(如果有一个事件存在的话),值是iframe(如果有iframe存在的话)。
``python
>iframeslist=example.iframes()
`````
>changlog
-
==v1.0.3==
*
_
>
>
>
=>要想安装libpyn,请在终端上运行这个命令
``conconsole
foo@bar:$pip install libpyn
`````
*播客类<;a name=“podcast class”>;<;/a>;
使用实例声明传递到中的“libsyn”通道的链接。
``python
channel='https://therabbithole.libsyn.com/'
example=podcast(channel)
```
podcast类包含有关podcast的有用信息。
``python
example.name=podcast频道的名称
self.mp3list=剧集列表,作为词典保存的每一集的每一集
self.htmlink=\link到podcast网站的链接
```
self.mp3list中的每一本词典都包含这些键/值对:
``python
podcast={}{}{{}存储podcast信息的词典
podcast['title']=
podcast['date']=\publishi发布日期
podcast['mp3']]>
podcast['image']=频道徽标
````
*下载podcast
使用**download()**函数。
``python
如果未指定foldername,则它将是通道的名称。(空格用下划线代替。)
``python
path='path/to/store/mp3'
directory='/files'
示例。下载(path=path,foldername=directory)
````
*\iframes
若要获取要嵌入到网页上的最新剧集的iframes,请使用**iframes()函数。
关键是事件的标题(如果有一个事件存在的话),值是iframe(如果有iframe存在的话)。
``python
>iframeslist=example.iframes()
`````
>changlog
-
==v1.0.3==
*
_