Yukaii / KKBox-web-source

:notes: mp3tag web source script for KKbox
6 stars 2 forks source link

URI must contain a hostname #2

Closed bebeboy closed 7 years ago

bebeboy commented 7 years ago

I got this error - "URI must contain a hostname" when searching. Any idea?

Yukaii commented 7 years ago

Hello, which version of Mp3Tag are you using? Also I'm not sure whether KKBox service is accessible outside Taiwan.

bebeboy commented 7 years ago

Hi Yukai,

Thanks for your reply. I am using Mp3Tag version 2.8. KKBox is accessible outside Taiwan I can search the lyrics or album etc from KKBox Taiwan.

Any idea which server is trying to connect with?

Sent from Outlookhttp://aka.ms/weboutlook


From: Yukai Huang notifications@github.com Sent: Sunday, June 4, 2017 7:26 PM To: Yukaii/KKBox-web-source Cc: bebeboy; Author Subject: Re: [Yukaii/KKBox-web-source] URI must contain a hostname (#2)

Hello, which version of Mp3Tag are you using? Also I'm not sure whether KKBox service is accessible outside Taiwan.

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Yukaii/KKBox-web-source/issues/2#issuecomment-306034288, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHOlpcTse3tyjYfGKO4w4ndGe1D_bvisks5sApRMgaJpZM4NMfCb.

Yukaii commented 7 years ago

@bebeboy I've just updated the script three days ago according to the recent changes of KKBox website, could you please download the latest one and try again?

Also, Mp3Tag writes a log file in c:\\debug_kkbox1.htm and c:\\debug_kkbox2.htm, upload these file and paste searching keywords here so I can help with you. πŸ˜„

bebeboy commented 7 years ago

Hi Yukai,

I don't see any error this time with the latest version, but unfortunately no result returned. I have tried (e.g. Easons' U87 ) with the URL inside your script and it should return the correct album. Just don't know why it doesn't work with the MP3TAG.

http://www.kkbox.com/tw/tc/search.php?search=album&word=U87

Sent from Outlookhttp://aka.ms/weboutlook


From: Yukai Huang notifications@github.com Sent: Tuesday, June 6, 2017 11:31 AM To: Yukaii/KKBox-web-source Cc: bebeboy; Mention Subject: Re: [Yukaii/KKBox-web-source] URI must contain a hostname (#2)

@bebeboyhttps://github.com/bebeboy I've just updated the script three days ago according to the recent changes of KKBox website, could you please download the latest one and try again?

Also, Mp3Tag writes a log file in c:\debug_kkbox1.htmhttps://github.com/Yukaii/KKBox-web-source/blob/master/KKBox.src#L23 and c:\debug_kkbox2.htmhttps://github.com/Yukaii/KKBox-web-source/blob/master/KKBox.src#L57, upload these file and paste searching keywords here so I can help with you.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Yukaii/KKBox-web-source/issues/2#issuecomment-306372120, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHOlpYX8wWlhO09jMNzXTItk8AEP4qOYks5sBMgrgaJpZM4NMfCb.

Yukaii commented 7 years ago

screen shot 2017-06-07 at 8 56 56 pm

I've tried this keyword without any problem, could you find c:\debug_kkbox1.htm and c:\debug_kkbox2.htm these two files and upload here?

bebeboy commented 7 years ago

I am not able to find the files you mentioned. Maybe blocked due to some security reason. May I know which keyword used? Not sure it's related to my location. Or I have directed to KKBox HK instead of Taiwan.

εΎžζˆ‘ηš„ iPhone 傳送

Yukai Huang notifications@github.com<mailto:notifications@github.com> ζ–Ό 2017εΉ΄6月7ζ—₯ 21:12 ε―«ι“οΌš

[screen shot 2017-06-07 at 8 56 56 pm]https://user-images.githubusercontent.com/4230968/26880005-9cb78e14-4bc5-11e7-8d24-6c721a99a15a.png

I've tried this keyword without any problem, could you find c:\debug_kkbox1.htm and c:\debug_kkbox2.htm these two files and upload here?

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Yukaii/KKBox-web-source/issues/2#issuecomment-306789990, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHOlpQnaxwQnGlFoxJ52ZsIwQvL2kEkYks5sBqFsgaJpZM4NMfCb.

Yukaii commented 7 years ago

I used U87 as the keyword.

I think the HK version of KKBox is a possible reason. I've once tried to implement a proxy server for generating formatted JSON album data (under /server folder). But when I deployed to heroku, KKBox blocked my server since heroku server is in USA. KKBox might host a another version that have different HTML structure.

bebeboy commented 7 years ago

Thanks anyway. I am using iTunes.src. But kkbox cover more Chinese album for sure.

εΎžζˆ‘ηš„ iPhone 傳送

Yukai Huang notifications@github.com<mailto:notifications@github.com> ζ–Ό 2017εΉ΄6月7ζ—₯ 22:44 ε―«ι“οΌš

I used U87 as the keyword.

I think the HK version of KKBox is a possible reason. I've once tried to implement a proxy server for generating formatted JSON album data (under /server folder). But when I deployed to heroku, KKBox blocked my server since heroku server is in USA. KKBox might host a another version that have different HTML structure.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Yukaii/KKBox-web-source/issues/2#issuecomment-306817224, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHOlpVbcShgRwIqt2a3eHNi4IyW_EV3hks5sBrdUgaJpZM4NMfCb.

bebeboy commented 7 years ago

Hi Yukai,

May I know the following URL will return you a formatted JSON like a text file? Wanna make a HK version if I can. Please share me any KKBOX API website if you have any. Thanks !

http://www.kkbox.com/tw/tc/search.php?search=album&word=http://www.kkbox.com/hk/tc/search.php?search=album&word=%shttps://www.kkbox.com/tw/tc/search.php?search=album&word=u87

Sent from Outlookhttp://aka.ms/weboutlook


From: Jerry Hui hui.jerry@hotmail.com Sent: Wednesday, June 7, 2017 11:26 PM To: Yukaii/KKBox-web-source Subject: Re: [Yukaii/KKBox-web-source] URI must contain a hostname (#2)

Thanks anyway. I am using iTunes.src. But kkbox cover more Chinese album for sure.

εΎžζˆ‘ηš„ iPhone 傳送

Yukai Huang notifications@github.com<mailto:notifications@github.com> ζ–Ό 2017εΉ΄6月7ζ—₯ 22:44 ε―«ι“οΌš

I used U87 as the keyword.

I think the HK version of KKBox is a possible reason. I've once tried to implement a proxy server for generating formatted JSON album data (under /server folder). But when I deployed to heroku, KKBox blocked my server since heroku server is in USA. KKBox might host a another version that have different HTML structure.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Yukaii/KKBox-web-source/issues/2#issuecomment-306817224, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHOlpVbcShgRwIqt2a3eHNi4IyW_EV3hks5sBrdUgaJpZM4NMfCb.

Yukaii commented 7 years ago

Currently KKBox.src script parses album information by looking up HTML of the search result page. As I know there's no public JSON API for searching KKBox music πŸ˜‚ . Let me describe more on how to modify mp3tag web source script.

There are 2 parts in web source script (https://github.com/Yukaii/KKBox-web-source/blob/master/KKBox.src). The first part is for finding album(line 23-50), the second part is for parsing album information(line 59-149).

A typical development flow is as follows:

  1. Search a album keyword in mp3tag (use a keyword for more than one album, otherwise mp3tag would skip the album selection popup)
  2. The search result popup shows
  3. Look into HTML source code of the search result (for example https://www.kkbox.com/tw/tc/search.php?search=album&word=apple)
  4. Look into mp3tag debug file (c:\\debug_kkbox1.htm, you can change that path).
  5. Use findlineor findinline to locate album information in webpage. You would need to change the value of parameter. You can find the web source reference in here.
  6. Similar to album search result, modify the second part, check the debug file in c:\\debug_kkbox2.htm
bebeboy commented 7 years ago

Hi Yukaii,

I still have no chance to work with your kkbox script. I have updated the path and now retrieved the debug_kkox1.htm. See whether you can help with. Thanks.

Sent from Outlookhttp://aka.ms/weboutlook


From: Yukai Huang notifications@github.com Sent: Thursday, June 8, 2017 5:51 PM To: Yukaii/KKBox-web-source Cc: bebeboy; Mention Subject: Re: [Yukaii/KKBox-web-source] URI must contain a hostname (#2)

Currently KKBox.src script parses album information by looking up HTML of the search result page. As I know there's no public JSON API for searching KKBox music πŸ˜‚ . Let me describe more on how to modify mp3tag web source script.

There are 2 parts in web source script (https://github.com/Yukaii/KKBox-web-source/blob/master/KKBox.src). The first part is for finding album(line 23-50), the second part is for parsing album information(line 59-149).

A typical development flow is as follows:

  1. Search a album keyword in mp3tag (use a keyword for more than one album, otherwise mp3tag would skip the album selection popup)
  2. The search result popup shows
  3. Look into HTML source code of the search result (for example https://www.kkbox.com/tw/tc/search.php?search=album&word=apple)
  4. Look into mp3tag debug file (c:\debug_kkbox1.htm, you can change that path).
  5. Use findlineor findinline to locate album information in webpage. You would need to change the value of parameter. You can find the web source reference in herehttp://help.mp3tag.de/main_online.html.
  6. Similar to album search result, modify the second part, check the debug file in c:\debug_kkbox2.htm

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Yukaii/KKBox-web-source/issues/2#issuecomment-307055791, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHOlpbKuoioHLqkhxhzfPvEg0oOEycK3ks5sB8QKgaJpZM4NMfCb.

Yukaii commented 7 years ago

@bebeboy Can you upload that file here? I could look into it when I have time.

bebeboy commented 7 years ago

Here is the file

debug_kkbox1.txt

Yukaii commented 7 years ago

@bebeboy According to this debug output, your source script might not be the latest version. Try the latest one πŸ˜„

bebeboy commented 7 years ago

Just downloaded the latest script and it works now. Thanks.