Installation Error

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
Post Reply
tigerray
Posts: 26
Joined: 2024-06-16 16:34:25
Location: US
Contact:

Installation Error

Post by tigerray »

I'm still getting an error. It is when another error occurs.

When I search for a movie using the program in "C:\ProgramData\Ant Movie Catalog" sometimes I get an error. Put "Mad Max (1979)" into the search box for IMDB. It gives the errors: "HTTP/1.1.405 Not Allowed", then "HTTP/1.1.404" and then "HTTP/1.1.404" again. And it comes up with nothing to add. I assume this is normal.

But when I search using the program that I compile, it gives the same errors, but it gives a fatal trap before each error:
"Debugger Exception Notification"
"Project MovieCatalog.exe raised exception class EldHTTPProtocolException with message 'HTTP/1.1.405 Not Allowed'. Process stopped. Use Step or Run to continue."

I think something is missing from the installation. I uninstalled/reinstalled from scratch and it gives the same error.
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Installation Error

Post by antp »

If you compile in debug mode it is normal to have an additional debug message.
The exception it mentions is the one trapped by the program to display the message.

The errors Not Allowed / Not Found you get is not due to the program, it is IMDb that seems to reject searching "Mad Max (1979)"
If you search only for "Mad Max" it works.

The script does this query: https://www.imdb.com/find?s=tt&q=Mad+Max+(1979)
And indeed if I open this in my browser I get an extra step to verify that I am human (which the program & script cannot do, since they are not programmed for it, so they land on a page from which they can't correctly get the movie info).

Maybe they block searches with the year in the title because it is usually done by robots rather than by humans.
tigerray
Posts: 26
Joined: 2024-06-16 16:34:25
Location: US
Contact:

Re: Installation Error

Post by tigerray »

Oh, OK. Thanks.
tigerray
Posts: 26
Joined: 2024-06-16 16:34:25
Location: US
Contact:

Re: Installation Error

Post by tigerray »

I know this is weird, but where do I find the place where the bad URL is found and stops the program to say "Error: HTTP/1.1.405?" I've set a breakpoint in every routine that has "URL" in it in main.pas and I can't find it.

I want the program to run uninterrupted since it takes 45 minutes to complete and each entry that has the error has to be manually redone anyway.
fulvio53s03
Posts: 744
Joined: 2007-04-28 05:46:43
Location: Italy

Re: Installation Error

Post by fulvio53s03 »

tigerray wrote: 2024-07-06 21:02:02 I want the program to run uninterrupted since it takes 45 minutes to complete and each entry that has the error has to be manually redone anyway.
I'm interested too. How can these errors (any HTTP error) be intercepted so that the characteristics of the film that caused the error can be written to a log file? :??:
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Installation Error

Post by antp »

If it does not open the code at the right place, maybe not all debug info are enabled. In Project->Options->Compiler you have to uncheck "Optimisation" and check "Debug information".

Otherwise the actual download of the page occurs in downloadthread.pas, search for FHTTP.Post or FHTTP.Get depending if it is for a PostPage or GetPage function.
Since it is in a separate thread, it is more difficult to debug.

If you want to run it on a whole catalog, it is better to do it with the compiled program running out of Delphi, not within the development environment.
tigerray
Posts: 26
Joined: 2024-06-16 16:34:25
Location: US
Contact:

Re: Installation Error

Post by tigerray »

Thanks.
tigerray
Posts: 26
Joined: 2024-06-16 16:34:25
Location: US
Contact:

Re: Installation Error

Post by tigerray »

I have a fix that prevents IMBD producing the page that says "Let's confirm you are a human". It is some lines in main.pas I added that remove the parentheses from the title of the movie before passing it to the IMDB search engine.

Here is a link to main.pas:
https://drive.google.com/drive/folders/ ... MnEWIF8TxW

Actually, it should work with any of the search engines.
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Installation Error

Post by antp »

When you say "before passing it to the IMDB search engine", you mean when using the function to open a browser window to search for the current entry on IMDb and others?
If so, the removal of parenthesis should be done only when searching the movie on the site, rather than modifying the entry of the catalog.
Otherwise what about movie titles that really have parenthesis in their title? The user would maybe not like to have these removed :)
tigerray
Posts: 26
Joined: 2024-06-16 16:34:25
Location: US
Contact:

Re: Installation Error

Post by tigerray »

I don't have any movies like that but I guess it's possible.
Post Reply