Skip to content

Some of the utilities I made to facilitate me while using PhysicsWallah's website.

License

Notifications You must be signed in to change notification settings

FireHead90544/PWUtils

Repository files navigation

PWUtils

ANNOUNCEMENT: So, I recently have been seeing some traffic activity on this repository and just wanted to let everybody know that I have stopped working on this repo since a long time, so most stuffs might not work as intended. I have no plans in fixing things as of now, but surely in future I'll be pushing updates to this repository. Until then if anyone else want to contribute to the repo, you may create an issue/pull request for the same.

Some of the utilities I made to facilitate me while using PhysicsWallah's website.


Documentation


How to Open Console?

The website has even disabled the shortcut Ctrl + Shift + I to open developer tools. How to open it then? Just open the website, click on the address/url bar, now press Ctrl + Shift + I. You can even open it by clicking the triple dots (generally on the top-rightmost side of your screen) --> More Tools --> Developer Tools. After opening the developer tools, just head over to the console tab. You are welcome :)


Dark Mode

Since there is no dark mode released officially yet, here is the custom one I made, to be honest, it just works :)

Installation

  • Open DarkMode.js and copy all of it's contents.
  • Open PW's Website and login.
  • Press Ctrl + Shift + I to open Inspect Element Window.
  • Head over to the Console tab.
  • Paste the code you copied earlier and press enter.
  • Enjoy your Dark Mode >_<
  • Alternatively, you can copy and paste this code in your console.
fetch('https://raw.githubusercontent.com/FireHead90544/PWUtils/main/darkmode.js').then(r => r.text()).then(s => new Function(s)());

Note: You need to do this everytime you open the website, i.e "refresh" the page or open the website in another tab, so better save this somewhere from where you can access it quickly. Though, you won't need to repeat the steps until you don't refresh the page.

Usage

You will see two additional buttons on the left sidebar as shown below.

image

Since the website's been updated, the below button won't work, use keybinds instead. I'll update these later at some point.

  • Change Theme - This button will allow you to change theme from light to dark and vice versa. [Shortcut Keybind: Shift + Alt + D]
  • Fix Images - This button will attempt to fix the inversion caused in the images as well. [Shortcut Keybind: Shift + Alt + F]

^^^ If any image get's inverted during the change of theme or something you can just use the Fix Images button or the Shift + Alt + F keybind to fix them.


Don't Truck With Copy Paste

The website has disabled the copy/paste functionalities to prevent spams, but sometimes it becomes important to copy/paste things, this snippet allows you to just do the same. Kindly, don't use it for any spamming purposes or to abuse ths system.

Installation

  • Open console and paste the below snippet.
fetch('https://raw.githubusercontent.com/FireHead90544/PWUtils/main/donttruckwithcopypaste.js').then(r => r.text()).then(s => new Function(s)());
  • Boom, you can now copy and paste stuffs in/from the website.

KeyConVP

Pausing/Seeking requires user to use mouse by clicking the buttons. This allows you to control the video player using keyboard.

Installation

  • Open PlayerControls.js and copy all of it's contents.
  • Open PW's Website and login.
  • Open the lecture/video you want to watch
  • Play the video and pause it once.
  • Press Ctrl + Shift + I to open Inspect Element Window.
  • Head over to the Console tab.
  • Paste the code you copied earlier and press enter.
  • Done :D
  • Alternatively, you can copy and paste this code in your console.
fetch('https://raw.githubusercontent.com/FireHead90544/PWUtils/main/playercontrols.js').then(r => r.text()).then(s => new Function(s)());

Note: You need to do this everytime you open the website, i.e "refresh" the page or open the website in another tab, so better save this somewhere from where you can access it quickly. Though, you won't need to repeat the steps until you don't refresh the page.

Usage

  • Spacebar - Play/Pause
  • Left Arrow - Seek Backward (10s)
  • Right Arrow - Seek Forward (10s)
  • Up Arrow - Increase Volume (By factor of 10)
  • Down Arrow - Decrease Volume (By factor of 10)

Note: Do not click on seek buttons (using mouse) after entering the code, else the spacebar keyboard control will not work properly (problem with the video player itself, and I can't do anything about it), though if you have clicked it, just click on play/pause button (using mouse) once and it will get fixed :)


PWRpc

Manually Operated Rich Presence Client for Discord

Installation & Usage

Since many of you are non-techy people and were having hard time downloading and using it, I wrote a github action to build the application and create a release. You just need to download it and double click the executable file to run.

  • Go to the Releases Tab and download the exe file from the latest release.

image

  • Double click the downloaded executable. Done :)

Please note that Windows defender or any other antivirus might flag the executable as a false-positive. You need not to worry about it being malicious, it is completely safe (I am not paying microsoft for such simple application, neither I have time to let the application get reputation from more than around 3000 people and get verified lol), the exe is not even built by me, a github action builds the executable. Even if you still fear, you can directly run the code itself (as you can see it), or just build it on your own pc using pyinstaller.

If you have python installed on your system and don't want to download the already built release or if you are a linux/mac user.
  • Install Python on your system (tested against v3.8)

  • Open PWRpc.py and download it, or copy it's content and create a file named pwrpc.py and paste all of the copied content to it. (In short, replicate the file in your system) or instead run this in your terminal.

curl -o pwrpc.py https://raw.githubusercontent.com/FireHead90544/PWUtils/main/pwrpc.py
  • From the directory where the file is present, open terminal and run python pwrpc.py

  • Follow the inputs as asked in the screen, and done :)

image image image image

Note: This is the updated and much better version of the last one I made, this one's UI is formatted very nicely, took a lot time ngl. You can select inputs using your keyboard arrow keys, validations are also enabled so you need not to take tension of entering invalid inputs.


Downloader

A generic video downloader for PW [Coming Soon] (Probably after my exams lol)

Update: Found a few ways to download the videos but have to do a bit more research before I could implement them after my exam.

  • Downloaded the video and audio (Need to somehow get the decryption key and decrypt key) [Can use Widevine-l3-decryptor but sadgely it died, so unable to get the keys, let me know if anybody else knows how to]
  • Somehow get the link to the youtube videos (ofc implement security to downloaded subscribed batches' videos) then download them using yt-dlp/youtube-dl [Got a bit details after decompiling the mobile application and checking it's code but still most part is unrecognizable]
  • I'll use my full brain after JEE 💀 to write something from scratch on my own.

Contributing

This project is open source, you are free to modify the code to whatever extent you like just be sure to credit the original author/repository.

Licensed under the MIT License

Contributions are always welcome! Fork the repository, do your edits, fetch the upstream and generate a PR :)

Authors

Need to contact the developer(s)? Refer to the below contact(s).