0
I am working on a script that needs to remove elements from a web page and add some text information to mine. I need you to script me from IMDB the description of an anime, how can I do it?
Example: through a link like this http://www.imdb.com/title/tt0433740/?ref_=nv_sr_1, I could add things in my html like, the main image, the description and the note.
Just a doubt, imdb allows this to be done?
– user28595
Script to run in a browser? Basically, you can’t. Browsers normally prevent XSS unless you use AJAX and Access-Control-Allow-Origin.
– LS_ᴅᴇᴠ
like @Ls_dev and @diegofm comentarm, it’s not right to take information like this from imdb and it won’t work from the browser in a simple way. Why don’t you use the
apiimdb? It allows you to query and treat the results, so you can show your site the way you want, including images. Take a look here: https://www.themoviedb.org/documentation/api– Ricardo Pontual
You can do this on a server level. A wget or equivalent pulls the page, then it becomes automated text editing. Then, after treating the text the way you want, return your editing to the browser
– Jefferson Quesado
Look, it’s not interesting that you do this way for 2 reasons 1 - Loading your site would be stuck until you download the IMDB content and reinsert it 2 - IMDB content is not static, it changes constantly. If they change a tag, you can mess up your entire site. As mentioned above, or you use the API and grab JSON. or you run a Rawler from time to time that downloads the imdb information to a database and from that database, you fill in your website. This is gonna be hard work, but it works.
– Paulo