Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add qingting.fm support #650

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

smasterfree
Copy link

Describe what this PR does / why we need it

add qingting.fm support

Does this pull request fix one issue?

Describe how you did it

many thanks for this project: https://github.com/koallen/qingting-dl
I just do some parsing job.

Describe how to verify it

already test for some channels

$ ./annie.exe https://www.qingting.fm/channels/234167

 Site:      qingting fm
 Title:     漫威的那些故事(六)—银河护卫队
 Type:      aduio
 Stream:
     [default]  -------------------
     Size:            2.04 MiB (2141154 Bytes)
     # download with: annie -f default ...

 2.04 MiB / 2.04 MiB [==========================================================================] 100.00% 9.64 MiB/s 0s

 Site:      qingting fm
 Title:     漫威的那些故事(五)—雷神
 Type:      aduio
 Stream:
     [default]  -------------------
     Size:            2.80 MiB (2934531 Bytes)
     # download with: annie -f default ...

Special notes for reviews

Can not download for paid channels.

Copy link
Owner

@iawia002 iawia002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, can you please add support for downloading a single audio program, eg: https://www.qingting.fm/channels/226572/programs/8275727

@@ -606,6 +606,7 @@ Pornhub | <https://pornhub.com> | ✓ | | | |
XVIDEOS | <https://xvideos.com> | ✓ | | | |
聯合新聞網 | <https://udn.com> | ✓ | | | |
TikTok | <https://www.tiktok.com> | ✓ | | | |
蜻蜓fm | <https://www.qingting.fm/> | | |✓ | |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
蜻蜓fm | <https://www.qingting.fm/> | | |✓ | |
蜻蜓fm | <https://www.qingting.fm/> | | | ✓ | |

"github.com/iawia002/annie/utils"
"io/ioutil"
"net/http"
"strings"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please group those packages

"strings"
)

type ChannelInfoApi struct {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type ChannelInfoApi struct {
type ChannelInfoAPI struct {

Name string
}

type ChannelAudioInfoApi struct {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

channelInfoUrl := getChannelInfoUrl(channelId)
channelInfoResponse, err := http.Get(channelInfoUrl)
if err != nil {
fmt.Println("Error in fetching JSON")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not print logs here, just return the error

audioInfoUrl := getChannelAudioInfoUrl(channelId)
response, err := http.Get(audioInfoUrl)
if err != nil {
fmt.Println("Error in fetching JSON")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Size: size,
}
return downloader.Data{
Site: "qingting fm",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Site: "qingting fm",
Site: "蜻蜓FM qingting.fm",

return downloader.Data{
Site: "qingting fm",
Title: title,
Type: "aduio",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Type: "aduio",
Type: "audio",

@iawia002 iawia002 force-pushed the master branch 4 times, most recently from dccdfc5 to de872ac Compare May 29, 2020 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants