aznhusband / aznhusband.github.io

52 stars 39 forks source link

icdrama website changes breaks parsing #43

Open jcheong-1 opened 4 years ago

jcheong-1 commented 4 years ago

Hi Aznhusband,

Looks like changes to the icdrama site is breaking the functionality of this again. Would you kindly have a look whenever you have some time?

I've updated the config.py to adrama.to (with notepad) and ran it there's no more error messages, but it still doesn't bring the up the pop up to select the streaming source.

Thanks!

tofufi commented 4 years ago

same problem here

9kitsune commented 4 years ago

Same here

mugol commented 4 years ago

It looks like something broke at mirror scrapping step. I think I found another way to grab the mirror links. The site is pretty wack with obscuring the video player itself though. I can look into this more over the weekend.

aznhusband commented 4 years ago

Yeah, Reddit's blowing up with this. I'll start poking around with it, mugol, if you come up with anything, post in this bug, we'll use this bug to track progress.

dfungfung commented 4 years ago

So glad that I found this thread. Created an account to say that yes I have the same problem. Wish this would be fixed soon so I can keep my wife happy ;)

aznhusband commented 4 years ago

Wishing won't get it fixed, dfungfung. We'll have to find the time to dig into the code, look at the updates to the website,and adjust all the scrapers.

GhostlVlan commented 4 years ago

Just wanted to say Thank You aznhusband and all the other developers working on maintaining this! Super appreciative!

dfungfung commented 4 years ago

Wishing won't get it fixed, dfungfung. We'll have to find the time to dig into the code, look at the updates to the website,and adjust all the scrapers.

Thank you For doing this! You’re amazing!

mugol commented 4 years ago

Update: I was able to get the mirror links.

mirrors2

However, it seems like the Picasaweb links need to go through a redirect before the video can be played. I tried resolving the redirect and returning the new url to actions._mirrors(), but that didn't work lol.

Sorry, I'm not that familiar with how videos work with HTTP requests in general. I assumed since the links worked in my browser for getting the raw video, they would work in Kodi. I'll look into this more later.

Here's the link to my progress:

https://github.com/mugol/aznhusband.github.io/commit/bc3a88eb6bef77293f1feacedfdaa5531a3323d1

aznhusband commented 4 years ago

Great! Gets us closer

thebetauser commented 4 years ago

@mugol is there a way to setup these python scripts to run in a pure python dev environment? If so, can you link me to any guides and I can help with this.

You can get the redirect url like this:


#Check if redirect occurred
if post_response.history:
    # last redirect url will be in post_response.url
    redirect_url = post_response.url```
mugol commented 4 years ago

@thebetauser I think you can technically run these scripts outside of Kodi if you want. However, your Python environment will probably throw a fit because the xbmc (or Kodi) library is not included. (I guess you can try using the Python environment in Kodi's files? I feel like that's not going to work as I imagine it would.)

Sorry I'm not much help in that regard. If it helps, here's the way I've been debugging this:

Editing the "production" files in the in the AppData folder (Not sure what this is in Mac/Linux): C:\Users\{your user here}\AppData\Roaming\Kodi\addons\plugin.video.icdrama\lib

thegoods

The files for the current repo should look like what's above. Kodi auto compiles the addon scripts every time there's a change, so you can just back out of the Icdrama addon and relaunch it in Kodi. Your changes should be live at that point. (Note: sometimes if the auto compile doesn't happen. I'd just relaunch Kodi.)

At this point you probably want logging, so you can add this anywhere in the script that has access to the xbmc library: xbmc.log('YOUR TESTING STRING HERE',level=xbmc.LOGNOTICE) mirrorsdebug For example, I put a log message in actions.py's _mirrors function.

The example xbmc.log has the flag "LOGNOTICE". This will output to the txt file here: C:\Users\{your user here}\AppData\Roaming\Kodi\kodi.txt

logagain2

There are different levels of logging that I haven't really looked into. Here's a forum about them. Look at the third post: https://forum.kodi.tv/showthread.php?tid=324570

That might have been a lot to digest for one comment. Let me know if you have any questions.

aznhusband commented 4 years ago

Made a bit of progress last night, still a long way to go. Would be nice to have some kind of a test-jig setup so I could do the whole thing from the command line.

jcheong-1 commented 4 years ago

Greatly appreciate everyone's efforts!

chimin commented 4 years ago

I have tried to run the resolveurl from standalone python, but since the website is broken now I can't sure I'm doing it correctly. Maybe you can see if this help? https://github.com/chimin/aznhusband.github.io/tree/master/src/plugin.video.icdrama/test

dumbo0001 commented 4 years ago

@mugol @aznhusband This commit https://github.com/dumbo0001/aznhusband.github.io/commit/c4ffa3e207b89b6760a8e4089a819bc9102a5bfc seems to fix the 1st picasaweb/google video source. No resolving is needed for the scraped video URL. Hope this helps..

thebetauser commented 4 years ago

I can confirm that @dumbo0001 codesnippet was able to play the googlevideo mirrors

aznhusband commented 4 years ago

OK, we've made some breakthoughs, another user also send me a snippet that was more elegant than what I was working on. I'll incorporate these changes, push a new version tonight.

tofufi commented 4 years ago

eager to see.......! TKS all effort  On Sunday, June 7, 2020, 01:22:15 p.m. EDT, aznhusband notifications@github.com wrote:

OK, we've made some breakthoughs, another user also send me a snippet that was more elegant than what I was working on. I'll incorporate these changes, push a new version tonight.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

LQQK324 commented 4 years ago

I hope everything works out I missed my drama

aznhusband commented 4 years ago

OK, just pushed ICDrama 2.1.0. Thanks to mugol, dumbo0001, and s_h (anonymous contributor) for the help. Web scraping ain't my thing, and I was suffering.

I'll leave this open for a couple of days, just in case we encounter new bugs.

jcheong-1 commented 4 years ago

OMG thanks aznhusband, mugol, dumbo0001, and s_h (anonymous contributor) for all of your hard work on maintaining this, really really appreciate everyone's efforts!

antheroo commented 4 years ago

Hi @aznhusband , not sure if it's due to the resolveurl script version I am using, but the unwrapped_url that my video resolved to was using 'googleusercontent.com'. Thus I had to add that check to get the plugin to work.

In file plugin.video.icdrama/lib/resolvers/icdrama.py, in get_media_url add check for 'googleusercontent.com'

if ('googleusercontent.com' in unwrapped_url or
    'redirector.googlevideo.com' in unwrapped_url or
    'blogspot.com' in unwrapped_url or
    'fbcdn.net' in unwrapped_url): #for current Videobug source
    # Kodi can play directly, skip further resolve
    return unwrapped_url
Ero-Sennin-Jiraiya commented 4 years ago

Thank you to all the Contributors! Now we can all sit back and relax while the wife binwatch ICDrama 2.1.0 Thx again, a round of beer for all!

LQQK324 commented 4 years ago

Finally I can watch my dramas. Thank you to all of you. Next round of beer is on me oo

On Mon, Jun 8, 2020, 9:07 AM Ero-Sennin-Jiraiya notifications@github.com wrote:

Thank you to all the Contributors! Now we can all sit back and relax while the wife binwatch ICDrama 2.1.0 Thx again, a round of beer for all!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/aznhusband/aznhusband.github.io/issues/43#issuecomment-640591464, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO7J3YEOMIDZGW7ZUXVXW2TRVTPCPANCNFSM4NMH5XZQ .

LQQK324 commented 4 years ago

So far everything seems fine, not sure about others. But sometimes I get the url limit exceeded or some of the video gets an error then hour later it works.

On Mon, Jun 8, 2020, 9:34 AM saf safwan.zokari@gmail.com wrote:

Finally I can watch my dramas. Thank you to all of you. Next round of beer is on me oo

On Mon, Jun 8, 2020, 9:07 AM Ero-Sennin-Jiraiya notifications@github.com wrote:

Thank you to all the Contributors! Now we can all sit back and relax while the wife binwatch ICDrama 2.1.0 Thx again, a round of beer for all!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/aznhusband/aznhusband.github.io/issues/43#issuecomment-640591464, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO7J3YEOMIDZGW7ZUXVXW2TRVTPCPANCNFSM4NMH5XZQ .

Starz2play commented 4 years ago

so far so good but I'm getting only 360P on piscaweb and the other available links (HLS, Hydrax and Uptobox) never work for me. Is there a reason why?

jcheong-1 commented 4 years ago

The addon just pulls the data from the website, the website only has 360p source and hence why you're only getting the 360p.

Before reporting an issue, always best to check the site directly first to see first of all if the video is working, then check which sources are available.

LQQK324 commented 4 years ago

Everything works fine for me. The only time it doesn't work is if the website is not working properly. If you only get 360p and not 720p it's not on the site yet.

On Tue, Jun 9, 2020, 9:56 PM jcheong-1 notifications@github.com wrote:

The addon just pulls the data from the website, the website only has 360p source and hence why you're only getting the 360p.

Before reporting an issue, always best to check the site directly first to see first of all if the video is working, then check which sources are available.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/aznhusband/aznhusband.github.io/issues/43#issuecomment-641673114, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO7J3YE2MR63MRGDRJJWF2LRV3R5NANCNFSM4NMH5XZQ .

antheroo commented 4 years ago

@Starz2play check the kodi logs and see. For my case the logs were showing CA Certificate errors. After updating the certificates then it works. Really depends on your device. Better to check the kodi.log

Sample error: 2020-06-08 10:49:40.897 T:4066025472 ERROR: CCurlFile::Stat - Failed: Peer certificate cannot be authenticated with given CA certificates(60) for https://www46.uptostream.com

f33dm3 commented 4 years ago

Shit, i just got my wife back for 2 weeks.

~Thanks~

chuachunmin commented 4 years ago

Fresh install of kodi & icdrama works on MacOS.

I tried changing config.py on my Nvidia Shield from http://www.icdrama.to to adrama.to. Can access menu but can't access the video links(picasa etc). I tried changing current_ua in resolveURL settings.xml. Doesn't work.

www1.icdrama.to is blocked. IMG_41BE180F4948-1

I fresh install kodi and icdrama on macbook. It didn’t work until I use Safari to load www1.adrama.to

On the Nvidia Shield, I load www1.adrama.to via the web viewer addon. Doesn’t work.

zmingxie commented 4 years ago

Fresh install of kodi & icdrama works on MacOS.

I tried changing config.py on my Nvidia Shield from http://www.icdrama.to to adrama.to. Can access menu but can't access the video links(picasa etc). I tried changing current_ua in resolveURL settings.xml. Doesn't work.

www1.icdrama.to is blocked. IMG_41BE180F4948-1

I fresh install kodi and icdrama on macbook. It didn’t work until I use Safari to load www1.adrama.to

On the Nvidia Shield, I load www1.adrama.to via the web viewer addon. Doesn’t work.

This is likely blocked by your ISP. Try to use Google DNS or Cloudflare and see if that helps.

chuachunmin commented 4 years ago

Fresh install of kodi & icdrama works on MacOS. I tried changing config.py on my Nvidia Shield from http://www.icdrama.to to adrama.to. Can access menu but can't access the video links(picasa etc). I tried changing current_ua in resolveURL settings.xml. Doesn't work. www1.icdrama.to is blocked. IMG_41BE180F4948-1 I fresh install kodi and icdrama on macbook. It didn’t work until I use Safari to load www1.adrama.to On the Nvidia Shield, I load www1.adrama.to via the web viewer addon. Doesn’t work.

This is likely blocked by your ISP. Try to use Google DNS or Cloudflare and see if that helps.

Thank you. That’s the solution.

jcheong-1 commented 3 years ago

Looks like since a couple days ago the site has made some changes and it broke the current version from working.

reddit user kablamosayswhat posted a fix for Edit config.py Edit (line 6): domains = ['adrama.to', 'icdrama.to', 'icdrama.se'] to domains = ['adrama.to', 'icdrama.to', 'icdrama.se', 'hkdrama.to']

I've tested it and it worked for me on my box.

@aznhusband sorry I'm not a coder, would it be possible to update this and push a new update?

Thanks!

Ero-Sennin-Jiraiya commented 3 years ago

Saw the 2.2.0 update from https://aznhusband.github.io/plugin.video.icdrama/ confirmed (Line 6) updated and is working, thx all!