RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    [SOFT] New Scraper in the works

    Scheduled Pinned Locked Moved Projects and Themes
    scrapingscrappersoftware
    253 Posts 7 Posters 71.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • kiroK
      kiro @Folly
      last edited by kiro

      @Folly Oh, BTW, I started playing around with a script for retropie-setup, it is in the git repository and it is a copy of another scraper's script. It works as far as the installation and running of the scraper goes. If you want to play with it, put it in ~/RetroPie-Setup/scriptmodules/supplementary and it should appear under the optional modules of retropie-setup. Just added the system selection option to rsetup ;-) ... videos still going ...

      1 Reply Last reply Reply Quote 0
      • kiroK
        kiro @Folly
        last edited by

        @Folly Hi, good news, the script for the videos is done, all videos should be working (at least those with a similar problem as pc-mario).

        FollyF 1 Reply Last reply Reply Quote 1
        • FollyF
          Folly @kiro
          last edited by Folly

          @kiro

          Great !
          Will test it this evening on my pi4.

          I already see the improvement on my VM.
          There are less errors reported after closing emulationstation.
          Superb ;-)

          kiroK 1 Reply Last reply Reply Quote 0
          • kiroK
            kiro @Folly
            last edited by

            @Folly thanks! In the meantime I've updated the retroscraper.sh script, seems to be working quite well, although it needs some cleaning and ironing, but functionality wise it seems to be ok.

            1 Reply Last reply Reply Quote 0
            • kiroK
              kiro
              last edited by kiro

              I've almost completed the retroscraper.sh script that would allow for seamless integration with retropie_setup script.

              https://github.com/zayamatias/retroscraper-rpie/blob/main/retroscraper.sh

              If you copy under the ~/RetroPie-Setup/scriptmodules/supplementary/ directory, you should see it under the optional packages:

              2611d4c7-30c1-40ed-a9d9-6a24eef6cf4b-image.png
              72cc8fc8-c931-48cf-b438-3505ef75b3b3-image.png
              840322cd-83d9-4e5f-8205-002d2d888426-image.png

              Install it from source, once done go to configurations / options

              0065af42-d536-4e93-a5f1-5fea620ca6ba-image.png

              c68f0b57-604b-4795-b5eb-e6fa6e9fa92a-image.png

              Choose your preferences, decide wether to scan everything or just some system(s):

              e20c6575-702d-4965-9b19-c42c52cbdf1b-image.png

              And let it run!

              d641eb5c-3672-4132-b859-a6f3eeae6dab-image.png

              Let me know how it works!

              Next steps, polish it a bit and hopefully integrate it with retropie?

              FollyF 1 Reply Last reply Reply Quote 1
              • FollyF
                Folly @kiro
                last edited by

                @kiro

                Had a quick look at the script.
                Was wondering where the dependencies were installed.
                Saw that you used su $user so obviously it's installed in the same path /home/pi/.local/bin .
                So you made it uniform with the normal install, great !

                Will have a look at the menu later.

                kiroK 1 Reply Last reply Reply Quote 0
                • kiroK
                  kiro @Folly
                  last edited by

                  @Folly the dependencies are basically a couple of python modules, not much more now, If I remember correctly. Still I have to improve the install/update script so things like pip dies not get installed everytime and checking that the modules are already installed. Retroscraoer itself will install in /opt/retropie/supplementary as every other tool from within retropie_setuo

                  FollyF 1 Reply Last reply Reply Quote 0
                  • FollyF
                    Folly @kiro
                    last edited by Folly

                    @kiro

                    Indeed, you should implement checks so things will not install every time.
                    Are you planning to do it with checksums or checking files/versions ?

                    Btw.
                    Is a pip install as dependency not an option ?
                    (as apt install from the function depends)

                    kiroK 1 Reply Last reply Reply Quote 0
                    • kiroK
                      kiro @Folly
                      last edited by

                      @Folly pip could be installed by apt, but I've had bad experiences with the pip install from the distribution, not always being the latest version. I ws planing to check if running pip would succeed and if not install it. And the. Checking if the dependencies are there (or even asking to install, since it's just a couple of modules and the installation is faulty quick) I will see what's the least cumbersome option.

                      FollyF 1 Reply Last reply Reply Quote 0
                      • FollyF
                        Folly @kiro
                        last edited by

                        @kiro

                        On second thought, I think it not a really big deal.
                        The update/install procedure is reasonably quick and fail-proof.
                        Perhaps it's best to keep it the way it is.

                        kiroK 2 Replies Last reply Reply Quote 0
                        • kiroK
                          kiro @Folly
                          last edited by

                          @Folly Could be, I'm going to be checking that today. On the other hand, I'm trying to improve the performance of the script when running under retropie-setup, latest test seems to be positive.

                          1 Reply Last reply Reply Quote 0
                          • kiroK
                            kiro @Folly
                            last edited by kiro

                            Hi @Folly ! I just finished adding the --mediadir flag, if you put a directory after it, it will store all media under it, it has two possibilities:

                            You start the directory by a '/' it will create an absolute path and add the system name (just to avoid clashes) so for example:

                            --mediadir /home/pi/RetroPie/medias/
                            

                            will save medias in

                            /home/pi/RetroPie/medias/system_name/
                            

                            The second option is not to start with '/' which will consider the path as relative, and save the media under the system directory, for example:

                            --mediadir emulationstation/medias/
                            

                            will save medias in

                            /system_path/emulation_station/medias/
                            

                            Also, I've improved (I hope) scraping speed.

                            Cheers!

                            FollyF 1 Reply Last reply Reply Quote 1
                            • FollyF
                              Folly @kiro
                              last edited by

                              @kiro

                              Great !
                              I wil test it asap.

                              Also had a quick look at the module-script config/tool menu.
                              I like the toggle setting in your menu and I did a small scrape with it.

                              kiroK 1 Reply Last reply Reply Quote 0
                              • kiroK
                                kiro @Folly
                                last edited by

                                @Folly Cool, let me know how it goes.. I have the impression that under retropie_setup it gets stuck sometimes, let me see if you experience the same behavior. I've also updated the retropie_setup retroscraper.sh script so it will not install pip again if already installed :-)

                                FollyF 1 Reply Last reply Reply Quote 0
                                • FollyF
                                  Folly @kiro
                                  last edited by Folly

                                  @kiro

                                  Here are a few minor things.
                                  Typo :
                                  Deleing Images

                                  Echo'ed twice :
                                  Writing Gamelist
                                  Writing Gamelist

                                  I did 2 tests.

                                  python3 /opt/retropie/supplementary/retroscraper/retroscraper.py --mediadir media/emulationstation/ --systems upright --cleanmedia --relativepaths
                                  

                                  Nice to see that all media is now in 1 directory.
                                  Did not expect that but I think it's nice for editing (all in one place)
                                  --mediadir media/emulationstation/ works as expected ;-)

                                  Also tried the --mediadir with absolutepath.
                                  This was my test :

                                  python3 /opt/retropie/supplementary/retroscraper/retroscraper.py --mediadir /home/pi/RetroPie/roms/upright --systems upright --cleanmedia
                                  

                                  I had a look at your explanation, it looks like it doesn't actually do the same as when adding a relative path.
                                  This could be confusing.
                                  Though I see what you want to accomplish.
                                  Putting the gamelist media outside the roms directory with adding the systemname.
                                  I did the above test and used a path with a roms directory.
                                  According to the gamelist the media files would be in :
                                  /home/pi/retropie/roms/upright/upright/
                                  Though the directory isn't created and there is no media.
                                  So there is probably an issue with creating the correct directory.

                                  I think you need to remove adding the system name to the absolute path so the absolute path option can be used both ways for placing media outside the roms directory and inside the roms directory.
                                  Or only add the system name if the path is outside the roms directory.

                                  I hope I gave you some good feedback.

                                  kiroK 1 Reply Last reply Reply Quote 0
                                  • kiroK
                                    kiro @Folly
                                    last edited by

                                    @Folly Hi, thanks for the typo :-)

                                    The problem with having everything in a single directory comes when you're scanning multiple systems at the same type. Imagine you scan snes and md, and ask absolute path for images such as '/home/pi/media' (just as an example)... and you have one file 'xenon 2.zip' in snes, and the exact same file 'xenon 2.zip' in md... now, if I didn't use subfolders (system name) one image would be 'xenon 2-image.zip' and the other would be 'xenon 2-image.zip' ... see where I'm getting?

                                    Another option would be to create 'xenon 2-snes-image.zip' and 'xenon 2-md-image.zip', but I'd be willing to say that from a management persepctive (imagine you had 120k roms in your whole rpie setup) it would be messier having everything in just 1 folder. Thoughts?

                                    I mean, in the end, is just a matter of taste, I could add a '--nosysfolder' flag or something quite easily to avoid creating a folder per system if using relative paths.

                                    Remember that the end objective is to allow you to scrap ALL your roms in a quick way.

                                    FollyF 1 Reply Last reply Reply Quote 0
                                    • FollyF
                                      Folly @kiro
                                      last edited by Folly

                                      @kiro

                                      Good info.
                                      Yes I am only seeing it from perspective scanning only one system.
                                      I now see why you did it this way.

                                      If you add a good description it shouldn't be a problem.

                                      Though the creation of the folder did not work with my 2nd test.
                                      What's your opinion.

                                      Edit :
                                      My fault I looked into the wrong folder RetroPie in stead of retropie.
                                      So it does work ! , sorry.

                                      kiroK 1 Reply Last reply Reply Quote 0
                                      • kiroK
                                        kiro @Folly
                                        last edited by

                                        @Folly maybe have a look at the logs? I know this could happen due to permission issues, sometimes... it should ouptut something like :

                                        CANNOT CREATE DIRECTORY [Your/directory] - ERROR [Explanation] - PLS VERIFY AND TRY AGAIN
                                        

                                        And then exit ... so strange is not exiting...have you got he latest version?

                                        FollyF 1 Reply Last reply Reply Quote 0
                                        • FollyF
                                          Folly @kiro
                                          last edited by Folly

                                          @kiro said in [SOFT] New Scraper in the works:

                                          so strange is not exiting...have you got he latest version?

                                          It does exit now always, so no problem.

                                          I checked the --mediadir option again with absolute path.
                                          The issue is that when using a path with the folder, for example, RetroPie (R and P are uppercase) RetroPie isn't used/created but retropie is. (everything with lowercase)

                                          I see you have fixed the other issues ;-)

                                          kiroK 1 Reply Last reply Reply Quote 0
                                          • kiroK
                                            kiro @Folly
                                            last edited by

                                            @Folly About the folders, didn't quite understand, so if you put /RetroPie/ will it create /retropie/ or you put /retropie/ and it will not be recognized as /RetroPie/ ? The latter being totally ok as directories under unix/linux are case sensitive..

                                            FollyF 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.