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

Remastered the Sprite Scraper utility (swapped BS4 for API + improvements) #157

Merged
merged 8 commits into from Apr 30, 2023

Conversation

v0rkath
Copy link
Contributor

@v0rkath v0rkath commented Apr 24, 2023

…e Media Wiki API

I've removed the aspects which relied on bs4 to load the pages and then scrape them by utilizing the Media Wiki API ().

Issue: [OSR-44] Make SpriteScraper use OSRS Wiki API
Fixes OSR-44

@v0rkath v0rkath changed the title Removed the use of BS4 in sprite_scraper.py, it not interacts with th… Removed the use of BS4 in sprite_scraper.py, it now interacts with th… Apr 24, 2023
@kelltom kelltom added type: feature request New feature or request type: enhancement This issue or pull request enhances existing code labels Apr 30, 2023
@kelltom
Copy link
Owner

kelltom commented Apr 30, 2023

Thanks for this! Nice code quality, was very easy to work with. As you can probably see, I've built onto this by further organizing the code to make it a bit more testable, adding some small optimizations and some minor features. I also fixed a small bug that was preventing special cases from being found.

This thing is ready to go. Cheers!

@kelltom kelltom changed the title Removed the use of BS4 in sprite_scraper.py, it now interacts with th… Remastered the Sprite Scraper utility (swapped BS4 for API + improvements) Apr 30, 2023
@kelltom kelltom merged commit a919eeb into kelltom:main Apr 30, 2023
1 check passed
Loaded-nz added a commit to Loaded-nz/OSRS-Bot-COLOR that referenced this pull request May 31, 2023
commit 44263da
Merge: 8c8a766 8cd2412
Author: Loaded-nz <130443238+Loaded-nz@users.noreply.github.com>
Date:   Fri May 19 02:27:20 2023 +1200

    Merge branch 'main' of https://github.com/kelltom/OS-Bot-COLOR

commit 8cd2412
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Wed May 17 11:15:37 2023 -0400

    Update README.md

commit 8c8a766
Merge: 5323dbb 3bd6f7e
Author: Loaded-nz <130443238+Loaded-nz@users.noreply.github.com>
Date:   Mon May 15 13:13:12 2023 +1200

    Merge branch 'main' of https://github.com/kelltom/OS-Bot-COLOR

commit 3bd6f7e
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 21:03:39 2023 -0400

    Update README.md

commit 06ab9ac
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 20:25:44 2023 -0400

    Update README.md

commit 5323dbb
Author: Loaded-nz <130443238+Loaded-nz@users.noreply.github.com>
Date:   Mon May 15 10:25:49 2023 +1200

    Hunter

commit 89ea0c2
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 17:33:35 2023 -0400

    Delete logo_large.psd

commit 1b04c5f
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 17:33:30 2023 -0400

    Delete logo.psd

commit e4774a7
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 17:33:23 2023 -0400

    Delete icon.psd

commit a2ebaa9
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 17:21:31 2023 -0400

    Update README.md

commit 10d1ae8
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 17:19:02 2023 -0400

    Add logo

commit 96d0269
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 17:18:05 2023 -0400

    Reset logo

commit 717ba20
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 17:17:29 2023 -0400

    Update README.md

commit 5f3ee14
Merge: ea04c5b 08b239f
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 17:14:48 2023 -0400

    Merge pull request kelltom#168 from kelltom/rebrand

    Rebrand

commit 08b239f
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 15:46:30 2023 -0400

    Update README.md

commit 79c8f31
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 15:45:03 2023 -0400

    Update README.md

commit 1057932
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 15:42:46 2023 -0400

    Update OSBC.py

commit b299b2b
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 15:42:31 2023 -0400

    Update intro_demo.gif

commit 8e96c47
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 15:34:18 2023 -0400

    Update logo.png

commit 8e04f42
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 15:26:18 2023 -0400

    Update README.md

commit 034ac87
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 15:25:44 2023 -0400

    Logo revision

commit 0da4146
Merge: 00ce879 f5a6ba4
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 13:01:56 2023 -0400

    Merge branch 'rebrand' of https://github.com/kelltom/OSRS-Bot-COLOR into rebrand

commit 00ce879
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 13:01:53 2023 -0400

    Image removal

commit f5a6ba4
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 12:29:35 2023 -0400

    Update README.md

commit 76255ef
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 12:28:59 2023 -0400

    Update README.md

commit e96661a
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 12:26:21 2023 -0400

    Create logo.png

commit e3a7663
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 12:22:39 2023 -0400

    Update options_menu.png

commit ab0962c
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 12:18:51 2023 -0400

    Pre-commit check

commit 466d81c
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 12:18:15 2023 -0400

    Update example scripts

commit 2843fc5
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 12:18:08 2023 -0400

    Update title_view.py

commit bc45a2e
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 12:18:00 2023 -0400

    Update README

commit c33f674
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 11:34:04 2023 -0400

    Delete non-functioning feature

commit a0b9633
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 11:33:48 2023 -0400

    Rewording

commit c106618
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 11:31:38 2023 -0400

    Artwork revisions

commit 63a6e67
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 11:31:24 2023 -0400

    Artwork revisions

commit ea04c5b
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 11:11:15 2023 -0400

    Delete LICENSE

commit 6e6cf6b
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 14 10:22:53 2023 -0400

    Update LICENSE

commit 11663f7
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sat May 13 19:29:43 2023 -0400

    Update README.md

commit 68c01ed
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sat May 13 19:22:51 2023 -0400

    Delete coin_pouch.png

commit 006cbb1
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sat May 13 14:01:58 2023 -0400

    Update README.md

commit 2b593df
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sat May 13 14:00:01 2023 -0400

    Update README.md

commit cd0788f
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sat May 13 13:58:53 2023 -0400

    Update README.md

commit bf6f45f
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sat May 13 13:48:59 2023 -0400

    Removed size limit on options windows

commit 80468ca
Merge: 1a933bf 7f37a8f
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sat May 13 11:05:32 2023 -0400

    Merge pull request kelltom#166 from kelltom/implement-scrollable-frames

    Upgrade to CustomTkinter 5 (scrolling frames, UI improvements)

commit 7f37a8f
Author: Kellen Evoy <kellenevoy@gmail.com>
Date:   Sat May 13 10:54:40 2023 -0400

    Fixed font loader path

commit a8cb2fc
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Fri May 12 11:13:17 2023 -0400

    Fixed bug involving CtkCheckbox changes

commit 0abf88c
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Fri May 12 11:13:01 2023 -0400

    Added CascadiaCode font family

commit 848b10b
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Fri May 12 10:50:41 2023 -0400

    Update options_builder.py

commit d22c000
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Thu May 11 23:53:02 2023 -0400

    Improved fonts

commit 73923e1
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Thu May 11 21:16:45 2023 -0400

    Implemented scrollable buttons for frame_left

commit 79ca67d
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Thu May 11 19:47:01 2023 -0400

    Fixed game launcher bugs

commit fe11ed5
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Wed May 10 22:19:53 2023 -0400

    Improved fonts

commit 8e2d81f
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Wed May 10 22:03:43 2023 -0400

    Fixed Home View fonts

commit 827f90d
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Wed May 10 18:15:51 2023 -0400

    Implemented custom font styles

    The HomeView is kind of broken right now. For some reason, it's not responding to the new font styles.

    Additionally, fonts need to be improved. Spacing needs to be corrected still.

commit c8f7c65
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Wed May 10 11:59:40 2023 -0400

    Resolved most errors

commit 1a933bf
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun May 7 17:28:38 2023 -0400

    Made Scraper default folder path instanced

commit bb57aef
Merge: a919eeb 9e798ae
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun Apr 30 17:46:06 2023 -0400

    Merge pull request kelltom#147 from WillowsDad/WillowsDad-AddItemFirstIndicetoMorgAPI

    Add MorgAPI method to get first occurrence of item(s) in inventory

commit 9e798ae
Merge: f2f5205 9a905eb
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun Apr 30 17:41:17 2023 -0400

    Merge branch 'WillowsDad-AddItemFirstIndicetoMorgAPI' of https://github.com/WillowsDad/OSRS-Bot-COLOR into pr/147

commit f2f5205
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun Apr 30 17:40:56 2023 -0400

    Renamed method, adjusted docstrings, added test code

commit 9a905eb
Merge: 93dbe55 a919eeb
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun Apr 30 17:22:14 2023 -0400

    Merge branch 'main' into WillowsDad-AddItemFirstIndicetoMorgAPI

commit a919eeb
Merge: e469d4c ab2f000
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun Apr 30 17:21:13 2023 -0400

    Merge pull request kelltom#157 from v0rkath/WikiAPI

    Removed the use of BS4 in sprite_scraper.py, it now interacts with th…

commit ab2f000
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun Apr 30 17:19:21 2023 -0400

    Removed BS4 dependencies

commit d129994
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun Apr 30 17:14:57 2023 -0400

    Made main search function return destination path

commit 8332be6
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun Apr 30 17:07:35 2023 -0400

    Divided main function into smaller ones, more error handling

commit f4348e9
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun Apr 30 16:23:33 2023 -0400

    Bugfixes, further optimization

commit 9d7c32f
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun Apr 30 15:23:27 2023 -0400

    Simplify __sprite_url structure

commit ba90e13
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun Apr 30 15:22:34 2023 -0400

    Added ImageType enum, fixed query formatting, added some error handling

commit e469d4c
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun Apr 30 14:56:09 2023 -0400

    Removed "1" from problematic characters list

commit 337df14
Merge: b4b54f4 ee3081d
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun Apr 30 13:53:37 2023 -0400

    Merge branch 'main' into WikiAPI

commit ee3081d
Merge: 8c68d5b b17fcec
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sun Apr 30 13:51:22 2023 -0400

    Merge pull request kelltom#159 from ThatOneGuyScripts/patch-1

    Adds cropping to extract_text and updates cropping in find_text. Also adds testing code to the OCR file.

commit b17fcec
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sat Apr 29 17:48:19 2023 -0400

    Added timer decorators to test calls

commit da50626
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sat Apr 29 17:42:08 2023 -0400

    Added problematic characters list

commit 69bc555
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sat Apr 29 17:00:55 2023 -0400

    Resolved circular import

commit b10da05
Author: Kellen Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sat Apr 29 16:17:54 2023 -0400

    Added test code

    - Add code to debug.py that automatically initializes a RL window
    - Linting

commit 6dbc96e
Author: ThatOneGuyScripts <125089137+ThatOneGuyScripts@users.noreply.github.com>
Date:   Thu Apr 27 12:42:02 2023 -0500

    issue found with certain texts using bold12

    Issues found when searching text using bold12

    limiting the cropping to 1 for all texts other than plain_12 which will crop 2 rows of pixels.

commit 21c07ea
Author: ThatOneGuyScripts <125089137+ThatOneGuyScripts@users.noreply.github.com>
Date:   Thu Apr 27 10:43:21 2023 -0500

    Update ocr.py

commit 6750d14
Author: ThatOneGuyScripts <125089137+ThatOneGuyScripts@users.noreply.github.com>
Date:   Thu Apr 27 10:38:21 2023 -0500

    removes import for bcd, whoops

commit 3939669
Author: ThatOneGuyScripts <125089137+ThatOneGuyScripts@users.noreply.github.com>
Date:   Thu Apr 27 10:30:26 2023 -0500

    Update ocr.py

commit 375f145
Author: ThatOneGuyScripts <125089137+ThatOneGuyScripts@users.noreply.github.com>
Date:   Thu Apr 27 10:22:35 2023 -0500

    Adds cropping to extract_text and updates cropping in find_text

    Adds cropping to extract_text and updates cropping in find_text both to cropping two pixels to fix character recognition inside of chatbox.

commit b4b54f4
Author: v0rkath <grinnedtumblr@gmail.com>
Date:   Mon Apr 24 09:24:30 2023 +0100

    Removed the use of BS4 in sprite_scraper.py, it not interacts with the Media Wiki API

commit 93dbe55
Author: WillowsDad <127373095+WillowsDad@users.noreply.github.com>
Date:   Sat Apr 22 16:19:59 2023 -0600

    Update morg_http_client.py

commit b6a9393
Merge: 5aa5269 8c68d5b
Author: Kell Evoy <44652363+kelltom@users.noreply.github.com>
Date:   Sat Apr 22 18:00:01 2023 -0400

    Merge branch 'main' into WillowsDad-AddItemFirstIndicetoMorgAPI

commit 5aa5269
Author: WillowsDad <127373095+WillowsDad@users.noreply.github.com>
Date:   Mon Mar 13 21:54:16 2023 -0600

    Update morg_http_client.py

    added method get_inv_item_first_indice

    Returns the first index in your inventory that an item is located in
    Useful for clicking on multiple items or just one when bank deposit settings are set to "all"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement This issue or pull request enhances existing code type: feature request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants