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

IMDB - Search Result Change #177

Closed
BBen1979 opened this issue Dec 3, 2022 · 35 comments
Closed

IMDB - Search Result Change #177

BBen1979 opened this issue Dec 3, 2022 · 35 comments

Comments

@BBen1979
Copy link

BBen1979 commented Dec 3, 2022

Hi there,

Some issues with returned search URL, been a few months now since they updated IMDB.

EG:
https://www.imdb.com/title/tt10738906/?ref_=fn_tt_tt_1 end up at https://www.imdb.com/find?q=The+Feast+(2021)&s=tt
https://www.imdb.com/title/tt14369780/?ref_=fn_tt_tt_1 end up at https://www.imdb.com/find?q=Lady+Chatterleys+Lover+(2022)&s=tt
https://www.imdb.com/title/tt19875906/?ref_=fn_tt_tt_1 end up at https://www.imdb.com/find?q=A+Wonderful+Time+of+the+Year+(2022)&s=tt

Basically pretty much every result end up on the search page instead of the good link.

EG:


<?php include_once 'imdb.class.php'; $IMDB = new IMDB('The Feast 2021'); if ($IMDB->isReady) {
    print_r($IMDB->getAll());
} else {
    echo 'Movie not found. 😞';
}

?>

URL: Will end up as Url [value] => https://www.imdb.com/find?q=The+Feast+2021&s=tt )


Thanks

@Artbabe
Copy link

Artbabe commented Dec 6, 2022

Yes
search pattern changed few days ago
and this masterpiece is not working properly

problem mostly happens when title is short
or
character exists in title like I'm [I am ...]

for test I am sending you last 2 cases:

Dinner 2016 correct is: https://www.imdb.com/title/tt6137968/
Sing 1989 correct is https://www.imdb.com/title/tt0098335/

@bla0r
Copy link
Contributor

bla0r commented Dec 6, 2022

Will taking a look into it.

@FabianBeiner
Copy link
Owner

I can't reproduce any of this, @BBen1979. :( Let us use one of @Artbabe's examples:

Searching for “Dinner 2016” gives us these results at IMDb directly (https://www.imdb.com/find?q=Dinner+2016&ref_=nv_sr_sm):

image

Using the latest version of the script returns:

image

If we force the script to search only for movies ($oIMDB = new IMDB('Dinner 2016', null, 'movie');) the result changes too:

image

And so does the script:

image

So, as you see, it behaves exactly as supposed to.

If I'm missing something here, please enable debug, run it again and post the output. Thanks.

@bla0r
Copy link
Contributor

bla0r commented Dec 7, 2022

Can confirm it. Please provide some debug notes.

@BBen1979
Copy link
Author

BBen1979 commented Dec 8, 2022

Updated to the latest imdb.class.php fixed my issue. Maybe i had a older version with the bug I posted.
Sorry about that, and thank you guys for all the support and great work. Love this script :P

@BBen1979 BBen1979 closed this as completed Dec 8, 2022
@Artbabe
Copy link

Artbabe commented Dec 16, 2022

hello
sorry , i didnt see it
@bla0r : you can go there and see if your scripts is working or not

just a note
I tested your current script which is very different from old one

Nanny 2022

test with your current script
poster didnt work also picked wrong movie as well

also
please show me a place where I can upload my previous script
because I changed it several times

my script has 2 problems
1- short lenght titles , and also title with character generate wrong result
of course I managed to solve part of character issue with ''your'' solution [and vs & array]

and
when there are 2 numbers in title , [2 four digits] it almost always gives wrong result]

where I can upload my script?

i will check this place every few hours
but if you are in rush add a comment in site and call me [ARIO] and folks will send me immediately

@Artbabe
Copy link

Artbabe commented Dec 16, 2022

OK
sorry
I think I posted in wrong place

thanks for everything [both of you , Maestro Fabian and also BL who helped us so much ]

have a nice day

@bla0r
Copy link
Contributor

bla0r commented Dec 18, 2022

@Artbabe if it's an issue please post a new issue.

and your posted title "Nanny 2022" works for me.

@Artbabe
Copy link

Artbabe commented Dec 26, 2022

@bla0r :
I already told you in that other thread
Search of imdb changed
the search pattern must be updated

Tides 2017
Maze 2017
200 M.P.H 2011
Isolated 2022

these are last 30 minutes' items which took wrong one
also I dont use this script for tv anymore , tv of imdb isnt good
just movie

please show me a place and let me upload my own script which is better than all ,you changed the whole script many times until you created this one which I updated in last months and debugged [using your tips]

before the day I reported the change in imdb's search [few weeks ago] my script had/has only 1 problem, which is
when there are two 4 digits numbers , it considers 2 years and misses almost 100%

but now , we must fix many posts manually due to this Search's issue

if you are in rush if you just post a comment in site I can answer faster please mention just your id
if not I will check this thread in few hours

@Artbabe
Copy link

Artbabe commented Dec 26, 2022

BTW
if you have any solution which I can forward to imdb team , I would be grateful
do you have any solution for their recent search problem?

Mayor 2020

Among Us 2019

I am in touch with one of their team

@bla0r
Copy link
Contributor

bla0r commented Dec 27, 2022

Can confirm the problems of your given titles. I will take a deeper look into it.

@Artbabe
Copy link

Artbabe commented Dec 29, 2022

in the meanwhile
no thread/post should be without maestro's name
Fabian
who shared his amazing skills with us , years ago
just wanted to pay my respect to him ,again

@bla0r 👍 one of your most helpful features was this one:

    $sSearch = preg_replace('/ and /i', ' & ', $sSearch);
    $sSearch = preg_replace('/Part 1/i', 'Part One', $sSearch);
    $sSearch = preg_replace('/Part 2/i', 'Part Two', $sSearch);
    $sSearch = preg_replace('/Part 3/i', 'Part Three', $sSearch);
    $sSearch = preg_replace('/Part 4/i', 'Part Four', $sSearch);
    // $sSearch = preg_replace('/ com /i', '.com ', $sSearch);
    $sSearch = preg_replace('/(Part([0-9]+))/i', 'Part$2', $sSearch);
    $sSearch = preg_replace("/Dont /i", "Don't ", $sSearch);
    $sSearch = preg_replace("/Didnt /i", "Didn't ", $sSearch);
    $sSearch = preg_replace("/ Doesnt /i", " Doesn't ", $sSearch);
    $sSearch = preg_replace("/ Wont /i", " Won't ", $sSearch);
    $sSearch = preg_replace("/Youre /i", "You're ", $sSearch);
    $sSearch = preg_replace("/ Cant /i", " Can't ", $sSearch);
    $sSearch = preg_replace("/Id Like /i", "I'd Like ", $sSearch);
    $sSearch = preg_replace("/ Aint /i", " Ain't ", $sSearch);

it is extremely IMP
it reduced the rate of mistake in such cases significantly
consider space before some cases which are also IMP factor

@Artbabe
Copy link

Artbabe commented Dec 31, 2022

Spider 2002
is funny case which just happened

@bla0r
I know exactly how good you are
but let me be honest , I dont think you can solve this search's bug [I call it]

g-d knows what imdb team has done last month
they literally destroyed the search function

@Artbabe
Copy link

Artbabe commented Dec 31, 2022

mistery solved

weirdly !!
a coder solved this problem

please do this way: [add &exact=true ]

https://www.imdb.com/find/?q=spider%202002&s=tt&exact=true&ref_=fn_tt_ex

@Artbabe
Copy link

Artbabe commented Dec 31, 2022

I closed that post which you asked me to close

I have a question
where I need to apply this &exact=true ?
can you tell me?

this is my script's biggest problem
I can handle other issues more/less
this is what is causing problem

            $this->sUrl = 'https://www.imdb.com/find?q=' . rawurlencode(str_replace(' ', ' ', $sSearch)) . $sParameters;                

is this where I should apply it?

@bla0r
Copy link
Contributor

bla0r commented Dec 31, 2022

A new commit with changes coming soon.

@Artbabe
Copy link

Artbabe commented Dec 31, 2022

Camping 2 2010

check this one too
kinda nice item
my script gets
https://www.imdb.com/title/tt1252380/

should get
https://www.imdb.com/title/tt1503096/

@bla0r
Copy link
Contributor

bla0r commented Jan 1, 2023

fixed. Check #181

@Artbabe
Copy link

Artbabe commented Jan 1, 2023

thank you
found your change

my [ur] script is older than the current one
I tested ur current one a few days ago and its not the one I prefer ,
this one is compatible with my needs
let me repeat:
this is also Yours

I sent you my whole imdb class
can you please apply the change to my imdb class
I sent it to you the way you sent me a year ago

if you cant change my script
will you replace your new one with old imdb class in main page?
then I can change the paragraphs which I want different function
I only need , Poster[big]+synopsis [after detecting right id of course]

@Artbabe
Copy link

Artbabe commented Jan 2, 2023

Bl:
thank you for everything
I am getting syntax error when I tried to use it

Fatal error: Call to undefined function array_column() in /imdb.class.php on line 450

which is
$matches = array_column($rData, 'match');

can you confirm if it is because of my changes or you also get it?

my 450 is different because i added ALTERNATE plot summary [4] also integrated those character stuff

@bla0r
Copy link
Contributor

bla0r commented Jan 2, 2023

Update your php.

@Artbabe
Copy link

Artbabe commented Jan 2, 2023

oh uh
its not possible

ok
so this is the reason
then I am dead man !

ok man thank you
it didnt work for me I hope it works for others
have a nice year

@FabianBeiner
Copy link
Owner

FabianBeiner commented Jan 3, 2023

oh uh its not possible

With the next bigger update, this script will drop support for anything under PHP 8 anyway. PHP 7 reached its end of life in November last year and does not get any updates, not even security ones. And even PHP 8.0 only has around one year more to life. I'd highly recommend updating anything to PHP 8.2 as soon as possible.

Besides, array_column is part of PHP since >= 5.5.0. Are you really running PHP 4.x? That is obsolete since 2008, 15 years.

@Artbabe
Copy link

Artbabe commented Jan 3, 2023

Goooood to see you Maestro Fabian

my php is 5.4.16 in that server which I use for test
last update = end of 2020 as far as I remember

this script is not doing what I expect [poster+synopsis , AFTER detecting the ID]
and since yesterday I am getting syntax error so I cant test the latest script

please close this thread
unfortunately my journey is over with this cool masterpiece

@FabianBeiner
Copy link
Owner

my php is 5.4.16 in that server which I use for test last update = end of 2020 as far as I remember

PHP 5.4.45 was published on 06 Jun 2013. You are running a server with major securities issues there. And have a look at https://www.php.net/supported-versions.php to see for yourself with PHP versions are actually current and still supported.

But yeah, either get the script downgraded manually by someone or try to find a replacement. 🙏🏻

@Artbabe
Copy link

Artbabe commented Jan 3, 2023

Using username "root".
Last login: Tue Jan 3 15:29:22 2023 from **
[root@localhost ~]# php -v
PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17)

Yes , I am woking to solve the search problem
if not then I will use some helps to just get ID-poster-synopsis of movie
I use this script for movie

again: thank you [both] for all of these years

@bla0r
Copy link
Contributor

bla0r commented Jan 3, 2023

built means compiled... you can update your php version and you'll be fine.

@bla0r
Copy link
Contributor

bla0r commented Jan 3, 2023

oh uh its not possible

With the next bigger update, this script will drop support for anything under PHP 8 anyway. PHP 7 reached its end of life in November last year and does not get any updates, not even security ones. And even PHP 8.0 only has around one year more to life. I'd highly recommend updating anything to PHP 8.2 as soon as possible.

Besides, array_column is part of PHP since >= 5.5.0. Are you really running PHP 4.x? That is obsolete since 2008, 15 years.

are you working on a new version? that sounds good 👍

@Artbabe
Copy link

Artbabe commented Jan 4, 2023

hello BL:
Updating php is not option for me because I dont have enough human-resource to rebuild all of my platform
platform writen in 2013 , updated few times and last update was 2020

I am Reserve IDF Medic and my contract ends at 2024 December
bcuz I must stay Human!! and wont break under pressure of WAR ,I must continue this hobby for 23 more months

so ,doesnt worth to rebuild everything!

and yes
I will find something to add Exact=true to old script
even a simple title like
Merrick 2017
miisses by my current script

the guy who wrote my platform , doesnt even answer my call [after he found out I am IDF medic ! , just medic !!]

@FabianBeiner
Copy link
Owner

are you working on a new version? that sounds good 👍

Not actively. ;) But I would do so much differently codewise nowadays, that I once in a while think about redoing it. On the other hand: I never ever used that script myself. 🤷🏻‍♂️ So there is no pressure behind this for me.

@bla0r
Copy link
Contributor

bla0r commented Jan 4, 2023

Merrick 2017

works at current script. Ask your coder what to do. You can replace array_column with array_map and an extended function.

cheers

@Artbabe
Copy link

Artbabe commented Jan 5, 2023

@bla0r
its not that
since the last month , I cant use this script
for me this project is over
I asked people to help me ,I hope I can find solution
thanks for all of these years @FabianBeiner and thanks to you @bla0r for fixing it many times

@Artbabe
Copy link

Artbabe commented Jan 18, 2023

hello
imdb's one of admins checked the case

but still , without exact=true , we have errors or wrong picked id

I asked them to set exact=true , default
and they sorta did it [not exactly]
but we still need to use exact=true for some items/day

which I still cant integrate to my script [I integrated exact=true but didnt change result at all , weird!!]
i think I am using bl's revsion which that [percent] also is causing this case

I just wanted you be aware of these stuff

I just hope I can convince them to fix search's problem

NOTE:
AFTER A WHILE , BECAUSE OF A SMART SCRIPT IN IMDB , IT STARTS PICKING RIGHT ITEM
but it takes 1 to 2 weeks to do it

this smart script monitors user's behaviours
for example
when they see my site sends 166k daily tier1 to a wrong item and then user chooses right one , it kinda brings the case up [in seearch]
but
after 1-2 weeks
and this is not good for me !!
but its good for imdb

it seems I must try , try ... to finally get proper script which can solve my problems

have a nice day , both of you amazing coders
Dear BL who solved my problem once , a year ago
and , "THE" master Fabian

@bla0r
I sent my script to ur protonmail
I tried to add exact=true but didnt change result and I did undo it
so this script gets wrong id in some cases

@Artbabe
Copy link

Artbabe commented Jan 27, 2023

can you show me a person who used your updated php version and can confirm that it gets the imdb movie correctly?
i mean regarding exact true's matter
then I can ask someone to turn to the php version which sites also can use it
whoever I know and I recommended them to use Dear Fabian's updated script , say ; they cant use it [due to different reasons but mostly bcuz when they try , it gives blank response [I assume its php?!]

we technically got crippled since 2 months ago
rate of error is insanely high
thanks G-d I only use for movie also only synopsis/poster [after recognizing id]

maybe among users someone can give us the advice which can end this problem
imdb's team also cant change their search's code due to lack of resource [unbelievable but true !]

I want it always uses exact=true
which I hope it reduces the error to acceptable range

@Artbabe
Copy link

Artbabe commented Feb 4, 2023

all problems solved

thanks guys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants