BinaryWorks.it Official Forum
BinaryWorks.it Official Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 eXtreme Movie Manager 8, 9, 10 Forum
 Scripts
 IMDb API & Web Scraping
 New Topic  Reply to Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 4 Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

JDommi
Administrator

Germany
4638 Posts

Posted - 18 Aug 2023 :  19:53:54  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Warum wird bei der rot markierten Stelle bereits ein Fehler angezeigt, obwohl ich nach dem Punkt hinter iMDbTitle Goofs und nach dem folgenden Punkt Anachronism auswählen kann?
Habe ich irgendwo eine Deklaration übersehen? Die Routine ist doch eigentlich mit den Connections identisch...

IMDbTitle.cs
using tar.IMDbScraper.Models;

namespace tar.IMDbExporter.Models
{
    internal class IMDbTitle
    {
        internal MainPage? MainPage { get; set; }
        internal List<AlternateTitle> AlternateTitles { get; set; } = new();
        internal List<TriviaEntry> TriviaEntries { get; set; } = new();
        internal Companies? Companies { get; set; }
        internal Connections? Connections { get; set; }
        internal Goofs? Goofs { get; set; }
        internal List<Dates> FilmingDates { get; set; } = new();
        internal List<FilmingLocation> FilmingLocations { get; set; } = new();
        internal LocationsPage? LocationsPage { get; set; }
        internal List<ReleaseDate> ReleaseDates { get; set; } = new();
        internal List<Award> Awards { get; set; } = new();
    }
}


region parse
...
            sbExport.AppendLine("---Goofs Anachronism");
            sbExport.Append(ParseGoofs(iMDbTitle.Goofs?.Anachronism));   <-- hier wird bereits ein Fehler angezeigt
...


region parse goofs
#region --- parse goofs -----------------------------------------------------------------------
        private static StringBuilder ParseGoofs(List<Goofs>? goofs)
        {
            StringBuilder result = new();

            goofs?
              .Do(x => result.AppendLine(
                $"{x.Text.PlainText}"
              ));

            return result;
        }
        #endregion

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

tarzibou
Starting Member

27 Posts

Posted - 18 Aug 2023 :  20:14:43  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
private static StringBuilder ParseGoofs(List<Goof>? goofs)


ohne s

List<Goof> ist eine Liste mit mehreren Goof-Einträgen.
Goofs enthält mehrere List<Goof>.

Edited by - tarzibou on 18 Aug 2023 20:15:53
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 18 Aug 2023 :  20:46:00  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Jetzt klappt es
Dieses Singular, Plural, Groß- und Kleinschreibung - da wird man ja echt kirre
Danke noch mal für die Hilfe, tarzibou!

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

tarzibou
Starting Member

27 Posts

Posted - 18 Aug 2023 :  22:14:16  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Joa, normalerweise sind Goofs auch mehrere Goof (also Goofs müsst eigentlich List<Goof> sein), aber das hab ich hier bissl anders gemacht, weil Goofs mehrere Einträge von List<Goof> enthält. Vielleicht doof von mir, weil sich das während der Entwicklung erst so ergeben hat. Hätte ich ändern sollen in ... mh AllGoofs (was jetzt Goofs ist) und Goofs (= List<Goof>). Dann wäre es sauberer.

Müsste bei Connections, Companies usw. genauso doof sein.

Ich bastel aber gerade intensiv an etwas anderem und hab keine Muße, das jetzt umzuwursteln.
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 18 Aug 2023 :  23:24:29  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Das ist kein Problem!
Hauptsache jetzt läuft alles
Aber erklärender wäre das für zukünftige Änderungen/Ergänzungen auf jeden Fall.

Habe gerade mal anfangen, das Script zu basteln. Vorhanden sein muss der IMDBLink. Der wird auch schon vom Script direkt übernommen (ohne #CREATEMOVIELIST#). Und den nativen Plot habe ich zum Testen bereits importiert.

*EDIT:
Soll ich die .exe des Exporters als Debug oder als Release kompilieren?
Und genauso wichtig, darf ich dein Programm der Allgemeinheit hier im Forum zur Verfügung stellen? Sollte evtl. noch ein Copyright-Vermerk eingebaut werden?

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

tarzibou
Starting Member

27 Posts

Posted - 19 Aug 2023 :  04:52:40  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ich hab das ja deswegen auf Github gestellt, damit es andere nutzen können und möglichst auch daran mitwirken, da ich nicht ständig (allein) alle Änderungen von IMDb tracken kann.

Du musst nur auf die öffentliche GNU Lizenz (GPL 3) hinweisen (oder diese hinterlegen, siehe https://github.com/tardezyx/tar.IMDbScraper/blob/main/LICENSE.txt). Ansonsten erlaubt dir diese die freie Nutzung und Änderung - unter der Voraussetzung, dass du diese Änderung(en) ebenfalls offen darlegst. Also damit den Nutzern quasi dieselben Rechte einräumst, wie ich dir. Das dürfte alles sein.

Release ist wohl besser, obwohl auch Debug funktionieren sollte - oder du machst dein eigenes Github-Projekt auf und lässt die Nutzer selbst compilen ;)
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 19 Aug 2023 :  09:08:57  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Super!

Hier ist die erst mal letzte Version: https://www.mediafire.com/file/jvajcccc6rhqu66/tar.IMDbExporter_%25284%2529.zip/file
Und das Grundgerüst des Scripts: https://www.mediafire.com/file/9nglbuad78k1i3a/IMDB_plus_for_Rel_10.txt/file

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 19 Aug 2023 :  12:51:24  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
https://www.mediafire.com/file/lqlqdr1zz2ewii6/IMDB_plus_for_Rel_10%25282%2529.txt/file

Es fehlen noch die Connections, Goofs und Awards. Leider komme ich da heute aber nicht mehr zu.

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 19 Aug 2023 :  15:52:22  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Bei den Connections scheint noch ein Fehler drin zu sein: Die Notes werden nicht übernommen. Auch beim Debuggen ist Notes immer null.
Ergebnis:
---Connections Features
https://www.imdb.com/title/tt0679174|Arrival (1967) Fernsehepisode Nummer 6 *
private static StringBuilder ParseConnections(List<Connection>? connections, bool withNote = false)
        {
            StringBuilder result = new();

            connections?
              .Do(x => result.AppendLine(
                $"{x.AssociatedTitle?.URL}|{x.AssociatedTitle?.LocalizedTitle} ({x.AssociatedTitle?.YearFrom}) {x.AssociatedTitle?.Type} {x.AssociatedTitle?.Series?.LocalizedTitle}"
                + (withNote
                  ? " * " + x.Notes
                  : string.Empty)
              ));

            return result;
        }

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

Alferio
Starting Member

35 Posts

Posted - 20 Aug 2023 :  11:33:32  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Guten Morgen. Tut mir leid, aber ich verstehe nichts von Programmierung. Reicht es aus, das Skript in den üblichen Ordner in XMM zu laden? Weil es für mich nichts herunterlädt.
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 20 Aug 2023 :  11:55:19  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Alferio!
Nein, das reicht noch nicht. Sobald das Script fertig ist, werde ich eine kurze Anleitung posten und alle erforderlichen Dateien in eine Datei packen.
Habe bitte noch etwas Geduld.

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

Mawu
Senior Member

Germany
1025 Posts

Posted - 22 Aug 2023 :  17:32:11  Show Profile  Visit Mawu's Homepage  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
@JDommi

Hat sich eigentlich zwischen xMM 9 und 10 die Datenbankstruktur geändert? Falls nicht könnte man mit beiden Versionen auf die gleiche Access-Datenbank zugreifen, d.h. mit XMM10 importieren und XMM9 weiter verwenden.

www.schlemmerkino.de - Die Nr.1 für filmische Leckereien
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 22 Aug 2023 :  18:04:24  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Gute Frage...
Müsste man mal mit einer Kopie einer Datenbank testen.

Edit:
In den .mdb steht bei mir einmal DB Version 8 und einmal 9. Demnach sollten die 3 Versionen eigentlich identisch sein...

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 24 Aug 2023 :  07:22:49  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Mal ein kleiner Zwischenbericht:
Für das IMDB_plus Script fehlen mir jetzt nur noch die Awards
Damit lassen sich dann auch alle Daten runterladen, die per Javascript (50 More / All) nachgeladen werden müssen.
Hier nochmal ein dickes Danke an tarzibou für den Scraper und seine Hilfe!

A little interim report:
The only thing missing for the IMDB_plus script is the awards
This allows you to download all the data that needs to be reloaded via Javascript (50 More / All).
Here again a big thank you to tarzibou for the scraper and his help!

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

tarzibou
Starting Member

27 Posts

Posted - 24 Aug 2023 :  11:31:13  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Update: https://github.com/tardezyx/tar.IMDbScraper/releases/tag/1.3.0

Added JSON export (contains everything scraped) and a better GUI. Adjusted the logic (of course).

You need to add the other things for the .txt export yourself, if you need it.

I have also added an URL input field. It determines and fills the IMDb ID field automatically.

Edited by - tarzibou on 24 Aug 2023 11:33:12
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 24 Aug 2023 :  16:01:36  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Well, I think that there are no further changes on the exporter are needed.
Since you have eliminated even those empty connection/goof categories I don't need the count anymore, too. But that I already had removed yesterday.

Only one thing that is needed: I have added a " * " right before Notes?.PlainText.

Next thing I will try is to adjust the output format for awards so that I don't have much to do on formatting them by the XMM script.

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 27 Aug 2023 :  12:15:45  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Here is the first full working version of the IMDB_Plus script for Release 10!!!
It allows you to download all the data that needs to be reloaded via Javascript (50 More / All) and the plot in your own language by your computer's country code.

You have to do:
_IMDB_: copy to your desktop
IMDBExporter: copy to XMM10/Plugins
IMDB_plus for Rel 10.txt: copy to XMM10/Scripts

The movie you want to import, MUST already have the IMDB-Link.


Additionally I have updated the general_functions.js for use with at least the last movie_bigcover Card (V24) version.
That's because the goofs are now handled like the connections (separated into categories).
https://www.mediafire.com/file/m8dpu8sq6c0o96b/Movie_BigCover_V24.rar/file

Just test it!

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

Mawu
Senior Member

Germany
1025 Posts

Posted - 28 Aug 2023 :  14:35:24  Show Profile  Visit Mawu's Homepage  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
@JDommi

Übersehe ich hier etwas oder fehlt noch der Download-Link?

www.schlemmerkino.de - Die Nr.1 für filmische Leckereien

Edited by - Mawu on 28 Aug 2023 14:35:48
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 28 Aug 2023 :  18:05:07  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Mit Link kann das doch jeder

Versuche es mal hier:
https://www.mediafire.com/file/szs8dols6hg0ocn/IMDBExporter.rar/file

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

Alferio
Starting Member

35 Posts

Posted - 28 Aug 2023 :  18:34:45  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hallo Jdommi. Ich gebe an, dass ich das 64-Bit-XMM 9.01.3 und nicht das xmm10 verwende. Ich glaube, ich habe alles wie angewiesen gemacht. Ich habe die Datei auf meinen Desktop kopiert, den Exporter in den Plugin-Ordner gelegt und das Skript in die . Aber wenn ich ein Film-Update starte, erhalte ich immer einen permanenten Weiterleitungsfehler. Könnte es ein Versionsproblem sein?
Go to Top of Page
Page: of 4 Previous Topic Topic Next Topic   Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
Previous Page | Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
BinaryWorks.it Official Forum © Binaryworks.it Go To Top Of Page
Generated in 0.19 sec. Powered By: Snitz Forums 2000 Version 3.4.07