Djaenk / zyBooks-Activity-Completer

Python 3 script which automatically completes assigments on the zyBooks platform.
MIT License
16 stars 14 forks source link

zybook xpath changes #12

Closed JartanFTW closed 3 years ago

JartanFTW commented 3 years ago

Looks like ZyBook has removed some of the whitespace in a bunch of their xpaths. Along with this they did change some of the xpaths entirely too. I'll make a branch and open a pull request to repair this.

Djaenk commented 3 years ago

Thank you, I'd appreciate the fixes. If you're able to and don't mind, could you replace broken xpaths with css selectors?

JartanFTW commented 3 years ago

Sure, I'll figure it out. I'll also make a branch to add a feature that checks if the activity is completed already, and skips it if it is. I already did this on an old version I was tinkering with but didn't think to actually contribute it.

JartanFTW commented 3 years ago

Please invite me as a contributor so I can open a new branch.

RoniJames commented 3 years ago

@JartanFTW Would you mind sharing the new xpaths with me? I tried adding you on discord but it seems you have it set to block friend requests.

JartanFTW commented 3 years ago

@JartanFTW Would you mind sharing the new xpaths with me? I tried adding you on discord but it seems you have it set to block friend requests.

I don't have it set to block friend requests. You might have your settings set to only allow friend requests from people in servers with you, or something similar. I'll likely create a fork of this repository and make a pull request from that. I'll do so within the next few days.

JartanFTW commented 3 years ago

Decided against making a fork because I don't know how they work. I'll open a branch and commit the css selectors fix once I'm invited as a contributor.

wcooperscott commented 3 years ago

Any updates with this?

JartanFTW commented 3 years ago

Any updates with this?

It's done. It's been done since the day after I opened this Issue. I just need to be invited as a contributor so I can open a branch and merge it into master/main.

wcooperscott commented 3 years ago

Any updates with this?

It's done. It's been done since the day after I opened this Issue. I just need to be invited as a contributor so I can open a branch and merge it into master/main.

That's great! @Djaenk @Boostem, could y'all?

Until then, is there a public repository of your changes I could use? This Java CS101 is on Zybooks...they won't let me take the final until I answer their 1000 questions.

Boostem commented 3 years ago

Why was I mentioned? You merged my PR from last year fixing headless mode :-)

wcooperscott commented 3 years ago

Why was I mentioned? You merged my PR from last year fixing headless mode :-)

My apologies, because this repo is in a small little corner of github, I assumed you co-authored this with Djaenk.

Boostem commented 3 years ago

@wcooperscott it's all good!

I forked and did a pull request which removes the need to be added a "contributor" just fork and work on the code and then make a pull request. @JartanFTW

JartanFTW commented 3 years ago

See pull request #13

JartanFTW commented 3 years ago

@wcooperscott Take a look here for a version with some added bugfixes and a feature to skip already completed activities. Also includes added PARTIAL support for 'run code' activities, and greatly improves the matching activities: https://github.com/JartanFTW/zyBooks-Activity-Completer/tree/master

Edit: You can disable the skipping of completed activities by setting skip_completed to False right under the headless option.

Djaenk commented 3 years ago

Request merged, thanks for the fixes.