返回首頁 

讨论»创建请求

hover on string and show actor image

发表于:2015-02-12
编辑于:2015-02-12

hover on string and show actor image

This will be amazing if this will be possible. So i have this from webpage:Actors: Brad Pitt, A. J. Cook, Jean-Claude Van Damme, Arnold Schwarzenegger
First i need a regex to find the actors delimited by comma and give them href properties, and always after last actor is
, and when i hover over actor name to show me a little photo of him from links down in comments, is it possible?

woxxom管理员
发表于:2015-02-12
编辑于:2015-02-12

It's possible but such script will slow down the browser and generate thousands of requests to google/imdb, so they'll block you after a few seconds :) If you're really into this hollywood stuff, you'll remember all the stars eventually by heart so just give it some time.

P.S. You've posted into the wrong forum. Site feedback is for greasyfork.org site feedback.

发表于:2015-02-12
编辑于:2015-02-12

sorry for wrong forum part :D i found something interesting i think:
so for example i have actress Emma Stone,
in this link there http://sg.media-imdb.com/suggests/e/emm.json
found her, it's loading fast, and there is posters too,
for Arnold Schwarzenegerr i just edited the link to
http://sg.media-imdb.com/suggests/a/arn.json and found Arnie too)
http://sg.media-imdb.com/suggests/j/jea.json - Jean-Claude Van Damme
so the script need to parse and find for the 1 letter and 3 letters from family
Bradd Pittt - http://sg.media-imdb.com/suggests/p/pit.json
Eva Longoria - http://sg.media-imdb.com/suggests/l/lon.json
Leslie Nielsen - http://sg.media-imdb.com/suggests/n/nie.json
so there is the first letter from family and then 3 letters too from family
i think this is it, this is the good path for script

发表于:2015-02-12
编辑于:2015-02-12

oh, and one more thing
http://sg.media-imdb.com/suggests/j/jol.json - Angelina Jolie (searched by family)
http://sg.media-imdb.com/suggests/a/ang.json - Angelina Jolie (search by name)
http://sg.media-imdb.com/suggests/p/pit.json - Brad Pitt (by family)
http://sg.media-imdb.com/suggests/b/bra.json - Brad Pitt (by name)
this is fun :D
P.P.S.: FYI this can find movies too
http://sg.media-imdb.com/suggests/a/arr.json - Arrow
http://sg.media-imdb.com/suggests/m/mat.json - The Matrix
http://sg.media-imdb.com/suggests/h/han.json - Hannibal

发表于:2015-02-13
编辑于:2015-02-13

ok, i guess i need to find how to write a regex to

Actors: Brad Pitt, A. J. Cook, Jean-Claude Van Damme, Arnold Schwarzenegger


because after Actors: on each movies will be different numbers of actors, until the
after last actor

发表于:2015-02-13
编辑于:2015-02-13

that's a good ideea, doing right now, thank you!

i guess the begin will be like that

var actors = /Actori.*?<\/b>\:\s(.*)
/g;
var splitactors = actors.split(',\s');

发表于:2015-02-14

offtopic:
I was plagued by vague doubts, barbiegirl and drakulaboy, aren't they the one and same person?

发表于:2015-02-14

hehe, nope, i'm only one person, my name is Andy and this is only my account

发表于:2015-02-14

found something, but now i just want to convert those strings in links, so when i hover with mouse it will appear a small pic

发表于:2015-02-17

Finally!!!
 
pics from imdb

发表回复

登录以发表回复。