Meta:MyMDb bots

From protonation
Jump to navigation Jump to search

Python scripts & bots

Robot icon.svg

Rationale

  1. Get wikitext of a page via API
  2. Parse wikitext with regex
    • Get variable values of templates
  3. Get semantic values via SMW API
  4. Add those values to variables
  5. Recreate wikitext
  6. Save back wikitext via API or pywikibot

Get wikitext of page

Test page: Ben-Hur

http://meta.protonotarios.eu/wiki/api.php?action=query&prop=revisions&rvprop=content&format=json&&titles=Ben-Hur

Result:

{"batchcomplete":"","query":{"pages":{"25277":{"pageid":25277,"ns":0,"title":"Ben-Hur","revisions":[{"contentformat":"text/x-wiki","contentmodel":"wikitext","*":"{{Movie\n|Has IMDb ID=tt0052618\n|Is of movie type=movie\n|Has Greek translated title=\u039c\u03c0\u03b5\u03bd \u03a7\u03bf\u03c5\u03c1\n|Is whatever translated level why=\u038c\u03c7\u03b9\n|Is whatever translated level more=\u038c\u03c7\u03b9\n|Is whatever translated level expert=\u038c\u03c7\u03b9\n|Is whatever translated level spoiler=\u038c\u03c7\u03b9\n|Is watchlisted=\u038c\u03c7\u03b9\n|Is of genre=Epic, Religious Epic, Historical epic, Christmas film, Chase film,\n|Is acted by=Charlton Heston, Jack Hawkins, Haya Harareet, Stephen Boyd, Hugh Griffith, Martha Scott, Cathy O'Donnell, Sam Jaffe,\n|Original music is scored by=Mikl\u00f3s R\u00f3zsa\n}}\n{{AwardSubObject\n|Award=Oscar\n|Award category=picture\n|Awarded person=Sam Zimbalist\n}}\n{{AwardSubObject\n|Award=Oscar\n|Award category=actor\n|Awarded person=Charlton Heston\n}}\n{{AwardSubObject\n|Award=Oscar\n|Award category=actor\n|Awarded person=Hugh Griffith\n}}\n{{AwardSubObject\n|Award=Oscar\n|Award category=director\n|Awarded person=William Wyler\n}}\n{{AwardSubObject\n|Award=Oscar\n|Award category=cinematography\n|Awarded person=Robert Surtees\n}}\n{{AwardSubObject\n|Award=Oscar\n|Award category=art direction\n|Awarded person=William A. Horning,\nEdward C. Carfagno,\nHugh Hunt,\n}}\n{{AwardSubObject\n|Award=Oscar\n|Award category=costumes\n|Awarded person=Elizabeth Haffenden\n}}\n{{AwardSubObject\n|Award=Oscar\n|Award category=sound editing\n|Awarded person=Franklin Milton\n}}\n{{AwardSubObject\n|Award=Oscar\n|Award category=visual effects\n|Awarded person=A. Arnold Gillespie,\nR.A. MacDonald,\nMilo B. Lory,\n}}\n{{AwardSubObject\n|Award=Oscar\n|Award category=score\n|Awarded person=Mikl\u00f3s R\u00f3zsa\n}}\n{{AwardSubObject\n|Award=Oscar\n|Award category=adapted screenplay\n|Awarded person=Karl Tunberg\n}}"}]}}}}


Sources:

Browse properties of page

http://meta.protonotarios.eu/wiki/api.php?action=browsebysubject&subject=Ben-Hur &format=json

Result:

{"query":{"subject":"Ben-Hur#0#","data":[{"property":"Has_DVD_date_of_release","dataitem":[{"type":6,"item":"1/2005/9/13"}]},{"property":"Has_Greek_translated_title","dataitem":[{"type":2,"item":"\u039c\u03c0\u03b5\u03bd \u03a7\u03bf\u03c5\u03c1"}]},{"property":"Has_IMDb_ID","dataitem":[{"type":2,"item":"tt0052618"}]},{"property":"Has_IMDb_rating","dataitem":[{"type":1,"item":"8.1"}]},{"property":"Has_IMDb_votes","dataitem":[{"type":1,"item":"167529"}]},{"property":"Has_Metascore","dataitem":[{"type":1,"item":"90"}]},{"property":"Has_OMDb_API_response","dataitem":[{"type":2,"item":"True"}]},{"property":"Has_Rotten_Tomatoes_Tomatometer","dataitem":[{"type":1,"item":"86"}]},{"property":"Has_Rotten_Tomatoes_consensus","dataitem":[{"type":2,"item":"Uneven, but in terms of epic scope and grand spectacle, Ben-Hur still ranks among Hollywood's finest examples of pure entertainment."}]},{"property":"Has_Rotten_Tomatoes_fresh_tomatoes","dataitem":[{"type":1,"item":"38"}]},{"property":"Has_Rotten_Tomatoes_image","dataitem":[{"type":9,"item":"Certified#0#"}]},{"property":"Has_Rotten_Tomatoes_rating","dataitem":[{"type":1,"item":"7.8"}]},{"property":"Has_Rotten_Tomatoes_reviews","dataitem":[{"type":1,"item":"44"}]},{"property":"Has_Rotten_Tomatoes_rotten_tomatoes","dataitem":[{"type":1,"item":"6"}]},{"property":"Has_Rotten_Tomatoes_user_meter","dataitem":[{"type":1,"item":"89"}]},{"property":"Has_Rotten_Tomatoes_user_rating","dataitem":[{"type":1,"item":"3.7"}]},{"property":"Has_Rotten_Tomatoes_user_reviews","dataitem":[{"type":1,"item":"105568"}]},{"property":"Has_TMDb_ID","dataitem":[{"type":2,"item":"665"}]},{"property":"Has_TMDb_backdrop_image_filename","dataitem":[{"type":2,"item":"/kV0wiMw24cgac7BqcppgkmUSGIw.jpg"}]},{"property":"Has_TMDb_image_url","dataitem":[{"type":2,"item":"http://image.tmdb.org/t/p/w396/syPMBvvZsADTTRu3UKuxO1Wflq.jpg"}]},{"property":"Has_TMDb_popularity","dataitem":[{"type":1,"item":"2.282953"}]},{"property":"Has_TMDb_rating","dataitem":[{"type":1,"item":"7.1"}]},{"property":"Has_TMDb_votes","dataitem":[{"type":1,"item":"349"}]},{"property":"Has_awards","dataitem":[{"type":2,"item":"Won 11 Oscars. Another 16 wins & 13 nominations."}]},{"property":"Has_country_of_production","dataitem":[{"type":9,"item":"USA#0#"}]},{"property":"Has_master_rater","dataitem":[{"type":2,"item":"IMDb"}]},{"property":"Has_master_rating","dataitem":[{"type":1,"item":"8.1"}]},{"property":"Has_plot","dataitem":[{"type":2,"item":"Judah Ben-Hur lives as a rich Jewish prince and merchant in Jerusalem at the beginning of the 1st century. Together with the new governor his old friend Messala arrives as commanding officer of the Roman legions. At first they are happy to meet after a long time but their different politic views separate them. During the welcome parade a roof tile falls down from Judah's house and injures the governor. Although Messala knows they are not guilty, he sends Judah to the galleys and throws his mother and sister into prison. But Judah swears to come back and take revenge."}]},{"property":"Has_runtime","dataitem":[{"type":1,"item":"212"}]},{"property":"Has_year_of_release","dataitem":[{"type":6,"item":"1/1959"}]},{"property":"Is_MPAA_rated","dataitem":[{"type":9,"item":"G#0#"}]},{"property":"Is_acted_by","dataitem":[{"type":9,"item":"Charlton_Heston#0#"},{"type":9,"item":"Jack_Hawkins#0#"},{"type":9,"item":"Haya_Harareet#0#"},{"type":9,"item":"Stephen_Boyd#0#"},{"type":9,"item":"Hugh_Griffith#0#"},{"type":9,"item":"Martha_Scott#0#"},{"type":9,"item":"Cathy_O'Donnell#0#"},{"type":9,"item":"Sam_Jaffe#0#"}]},{"property":"Is_directed_by","dataitem":[{"type":9,"item":"William_Wyler#0#"}]},{"property":"Is_in_language","dataitem":[{"type":9,"item":"English#0#"}]},{"property":"Is_of_genre","dataitem":[{"type":9,"item":"Epic#0#"},{"type":9,"item":"Religious_Epic#0#"},{"type":9,"item":"Historical_epic#0#"},{"type":9,"item":"Christmas_film#0#"},{"type":9,"item":"Chase_film#0#"},{"type":9,"item":"Adventure#0#"},{"type":9,"item":"Drama#0#"},{"type":9,"item":"History#0#"}]},{"property":"Is_of_movie_type","dataitem":[{"type":9,"item":"Movie#0#"}]},{"property":"Is_produced_by","dataitem":[{"type":9,"item":"MGM#0#"}]},{"property":"Original_music_is_scored_by","dataitem":[{"type":9,"item":"Mikl\u00f3s_R\u00f3zsa#0#"}]},{"property":"_ASK","dataitem":[{"type":9,"item":"Ben-Hur#0##_QUERY09391c63ba91f0aafa3615effd7c9aee"},{"type":9,"item":"Ben-Hur#0##_QUERY2187ec168b88a70e78a54c33004d9e78"},{"type":9,"item":"Ben-Hur#0##_QUERY91247c085e3f4abc440cf09973df2514"},{"type":9,"item":"Ben-Hur#0##_QUERYe93993bff70a3a97a2dc940a73fc71da"},{"type":9,"item":"Ben-Hur#0##_QUERY0ac18cebd91f0122f4fcedfe734fff68"},{"type":9,"item":"Ben-Hur#0##_QUERY71eeb391a3a1f186cab251cc8f06fcfa"},{"type":9,"item":"Ben-Hur#0##_QUERY0eb0235af41aa74410097ec734e9e494"},{"type":9,"item":"Ben-Hur#0##_QUERYc1d68da0343c462f380f874cf4c9c3b1"},{"type":9,"item":"Ben-Hur#0##_QUERY20e957a18eefc1efbdaa3a3b1207bffe"},{"type":9,"item":"Ben-Hur#0##_QUERYbb8afb447af040caf24fe76c04bd9965"},{"type":9,"item":"Ben-Hur#0##_QUERYe0650b8b8f067dd1d4ef872e13e24391"},{"type":9,"item":"Ben-Hur#0##_QUERY45e21f57795954f1090c21ed033611a0"},{"type":9,"item":"Ben-Hur#0##_QUERY93f5b8acb56d1554fb9cb87cd536da98"},{"type":9,"item":"Ben-Hur#0##_QUERY6ceebd492bf17ae55ca07264eea624ff"},{"type":9,"item":"Ben-Hur#0##_QUERYd52ad62810298b48c1d411f6820d4861"},{"type":9,"item":"Ben-Hur#0##_QUERY884c575b8d393feee534de13858ff0e9"},{"type":9,"item":"Ben-Hur#0##_QUERY43824eff5c29cd5ff9d523aaa0c63365"},{"type":9,"item":"Ben-Hur#0##_QUERY8bd393697871b623a17ac7517c722c3d"},{"type":9,"item":"Ben-Hur#0##_QUERY8f76ae01ac44b77ab9110a2dbab753fd"},{"type":9,"item":"Ben-Hur#0##_QUERYa527835ebc7882ce269f347ce4a6ea14"},{"type":9,"item":"Ben-Hur#0##_QUERYbcd1cba2b3e9b4a51ff5e16a8756c602"},{"type":9,"item":"Ben-Hur#0##_QUERY35e52e47d822cb8b193fb296cf029d41"},{"type":9,"item":"Ben-Hur#0##_QUERY16a164acb1b1d302f0415aba7a2b1b93"},{"type":9,"item":"Ben-Hur#0##_QUERY1cd5f2bc7f895e11ed7a135533f8f91a"},{"type":9,"item":"Ben-Hur#0##_QUERYa1285838de46acbd07d0a20e1bafdd19"},{"type":9,"item":"Ben-Hur#0##_QUERY0f1417282035f5f419cd0742c5d02040"},{"type":9,"item":"Ben-Hur#0##_QUERYa9f5474679f54a6043daaf0d1b59c1f4"}]},{"property":"_CDAT","dataitem":[{"type":6,"item":"1/2016/12/9/15/34/24/0"}]},{"property":"_INST","dataitem":[{"type":9,"item":"Movies#14#"}]},{"property":"_LEDT","dataitem":[{"type":9,"item":"Ioannis_Protonotarios#0#"}]},{"property":"_MDAT","dataitem":[{"type":6,"item":"1/2016/12/9/15/34/24/0"}]},{"property":"_NEWP","dataitem":[{"type":4,"item":"f"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]},{"property":"_SOBJ","dataitem":[{"type":9,"item":"Ben-Hur#0##_0be9088daf1f24e5d12f3ba63e57d502"},{"type":9,"item":"Ben-Hur#0##_5ebb3b8a794c141f0d1f16e3e74740a7"},{"type":9,"item":"Ben-Hur#0##_8d1937c9caa95c0f8e47ee5240d961d6"},{"type":9,"item":"Ben-Hur#0##_9cf238a83faf5c769c451cd87f52df16"},{"type":9,"item":"Ben-Hur#0##_ef05f0f4203a59799d7ab2060738033c"},{"type":9,"item":"Ben-Hur#0##_a651c87b51164b696cc186b422a289b1"},{"type":9,"item":"Ben-Hur#0##_12ef0b27ba3d655173f3d571398f6ff2"},{"type":9,"item":"Ben-Hur#0##_08406aa253b9ba022f6a5e858f7da9f9"},{"type":9,"item":"Ben-Hur#0##_e16eab3eccf84be254c254fd7edab995"},{"type":9,"item":"Ben-Hur#0##_d3a746dd4938242cbbc00fb82eca6fef"},{"type":9,"item":"Ben-Hur#0##_d70407a6158110d6b9b841ae0a7fa5eb"},{"type":9,"item":"Ben-Hur#0##_4ceca097c6617cf2b29db92e27722a8d"},{"type":9,"item":"Ben-Hur#0##_6e0c913d91b1eb1c4f4e577fed7dbe7e"}]}],"sobj":[{"subject":"Ben-Hur#0##_QUERY09391c63ba91f0aafa3615effd7c9aee","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"template"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"2"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[AwardSubObject::Ben-Hur]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERY2187ec168b88a70e78a54c33004d9e78","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"0"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"list"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[:Ben-Hur]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERY91247c085e3f4abc440cf09973df2514","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"0"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"list"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[:Ben-Hur]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERYe93993bff70a3a97a2dc940a73fc71da","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"list"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"2"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[Follows::Ben-Hur]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERY0ac18cebd91f0122f4fcedfe734fff68","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"0"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"list"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[:Ben-Hur]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERY71eeb391a3a1f186cab251cc8f06fcfa","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"0"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"list"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[:Ben-Hur]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERY0eb0235af41aa74410097ec734e9e494","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"count"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"3"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[\u039a\u03b1\u03c4\u03b7\u03b3\u03bf\u03c1\u03af\u03b1:Clips]] [[Shows::Ben-Hur]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERYc1d68da0343c462f380f874cf4c9c3b1","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"template"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"3"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[\u039a\u03b1\u03c4\u03b7\u03b3\u03bf\u03c1\u03af\u03b1:Movies]] [[Is remake of::Ben-Hur]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERY20e957a18eefc1efbdaa3a3b1207bffe","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"template"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"3"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[\u039a\u03b1\u03c4\u03b7\u03b3\u03bf\u03c1\u03af\u03b1:Movies]] [[Is inspired by::Ben-Hur]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERYbb8afb447af040caf24fe76c04bd9965","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"template"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"3"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[\u039a\u03b1\u03c4\u03b7\u03b3\u03bf\u03c1\u03af\u03b1:Movies]] [[Is a tribute to::Ben-Hur]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERYe0650b8b8f067dd1d4ef872e13e24391","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"template"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"3"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[\u039a\u03b1\u03c4\u03b7\u03b3\u03bf\u03c1\u03af\u03b1:Movies]] [[Is a spin-off of::Ben-Hur]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERY45e21f57795954f1090c21ed033611a0","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"template"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"3"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[\u039a\u03b1\u03c4\u03b7\u03b3\u03bf\u03c1\u03af\u03b1:Movies]] [[Spoofs::Ben-Hur]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERY93f5b8acb56d1554fb9cb87cd536da98","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"0"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"list"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"2"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[\u039a\u03b1\u03c4\u03b7\u03b3\u03bf\u03c1\u03af\u03b1:Movies]] [[:Ben-Hur]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERY6ceebd492bf17ae55ca07264eea624ff","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"list"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"3"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[Shows::Ben-Hur]] [[\u0391\u03c1\u03c7\u03b5\u03af\u03bf:+]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERYd52ad62810298b48c1d411f6820d4861","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"count"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"2"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[Has writer internal object::Ben-Hur]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERY884c575b8d393feee534de13858ff0e9","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"ul"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"2"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[Has writer internal object::Ben-Hur]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERY43824eff5c29cd5ff9d523aaa0c63365","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"0"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"list"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[:Charlton Heston]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERY8bd393697871b623a17ac7517c722c3d","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"0"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"list"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[:Jack Hawkins]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERY8f76ae01ac44b77ab9110a2dbab753fd","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"0"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"list"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[:Haya Harareet]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERYa527835ebc7882ce269f347ce4a6ea14","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"0"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"list"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[:Stephen Boyd]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERYbcd1cba2b3e9b4a51ff5e16a8756c602","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"0"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"list"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[:Hugh Griffith]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERY35e52e47d822cb8b193fb296cf029d41","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"0"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"list"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[:Martha Scott]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERY16a164acb1b1d302f0415aba7a2b1b93","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"0"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"list"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[:Cathy O'Donnell]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERY1cd5f2bc7f895e11ed7a135533f8f91a","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"0"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"list"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[:Sam Jaffe]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERYa1285838de46acbd07d0a20e1bafdd19","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"gallery"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"3"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[Shows::Ben-Hur]] [[\u0391\u03c1\u03c7\u03b5\u03af\u03bf:+]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERY0f1417282035f5f419cd0742c5d02040","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"list"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"3"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[Shows::Ben-Hur]] [[\u0391\u03c1\u03c7\u03b5\u03af\u03bf:+]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_QUERYa9f5474679f54a6043daaf0d1b59c1f4","data":[{"property":"_ASKDE","dataitem":[{"type":1,"item":"1"}]},{"property":"_ASKFO","dataitem":[{"type":2,"item":"template"}]},{"property":"_ASKSI","dataitem":[{"type":1,"item":"2"}]},{"property":"_ASKST","dataitem":[{"type":2,"item":"[[Has custom section internal object::Ben-Hur]]"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_0be9088daf1f24e5d12f3ba63e57d502","data":[{"property":"Has_type_of_writing","dataitem":[{"type":2,"item":"novel"}]},{"property":"Has_writer_internal_object","dataitem":[{"type":9,"item":"Ben-Hur#0#"}]},{"property":"Is_written_by","dataitem":[{"type":9,"item":"Lew_Wallace#0#"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_5ebb3b8a794c141f0d1f16e3e74740a7","data":[{"property":"Has_type_of_writing","dataitem":[{"type":2,"item":"screenplay"}]},{"property":"Has_writer_internal_object","dataitem":[{"type":9,"item":"Ben-Hur#0#"}]},{"property":"Is_written_by","dataitem":[{"type":9,"item":"Karl_Tunberg#0#"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_8d1937c9caa95c0f8e47ee5240d961d6","data":[{"property":"Award","dataitem":[{"type":2,"item":"Oscar"}]},{"property":"AwardSubObject","dataitem":[{"type":9,"item":"Ben-Hur#0#"}]},{"property":"Award_category","dataitem":[{"type":9,"item":"Picture#0#"}]},{"property":"Awarded_person","dataitem":[{"type":9,"item":"Sam_Zimbalist#0#"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_9cf238a83faf5c769c451cd87f52df16","data":[{"property":"Award","dataitem":[{"type":2,"item":"Oscar"}]},{"property":"AwardSubObject","dataitem":[{"type":9,"item":"Ben-Hur#0#"}]},{"property":"Award_category","dataitem":[{"type":9,"item":"Actor#0#"}]},{"property":"Awarded_person","dataitem":[{"type":9,"item":"Charlton_Heston#0#"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_ef05f0f4203a59799d7ab2060738033c","data":[{"property":"Award","dataitem":[{"type":2,"item":"Oscar"}]},{"property":"AwardSubObject","dataitem":[{"type":9,"item":"Ben-Hur#0#"}]},{"property":"Award_category","dataitem":[{"type":9,"item":"Actor#0#"}]},{"property":"Awarded_person","dataitem":[{"type":9,"item":"Hugh_Griffith#0#"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_a651c87b51164b696cc186b422a289b1","data":[{"property":"Award","dataitem":[{"type":2,"item":"Oscar"}]},{"property":"AwardSubObject","dataitem":[{"type":9,"item":"Ben-Hur#0#"}]},{"property":"Award_category","dataitem":[{"type":9,"item":"Director#0#"}]},{"property":"Awarded_person","dataitem":[{"type":9,"item":"William_Wyler#0#"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_12ef0b27ba3d655173f3d571398f6ff2","data":[{"property":"Award","dataitem":[{"type":2,"item":"Oscar"}]},{"property":"AwardSubObject","dataitem":[{"type":9,"item":"Ben-Hur#0#"}]},{"property":"Award_category","dataitem":[{"type":9,"item":"Cinematography#0#"}]},{"property":"Awarded_person","dataitem":[{"type":9,"item":"Robert_Surtees#0#"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_08406aa253b9ba022f6a5e858f7da9f9","data":[{"property":"Award","dataitem":[{"type":2,"item":"Oscar"}]},{"property":"AwardSubObject","dataitem":[{"type":9,"item":"Ben-Hur#0#"}]},{"property":"Award_category","dataitem":[{"type":9,"item":"Art_direction#0#"}]},{"property":"Awarded_person","dataitem":[{"type":9,"item":"William_A._Horning#0#"},{"type":9,"item":"Edward_C._Carfagno#0#"},{"type":9,"item":"Hugh_Hunt#0#"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_e16eab3eccf84be254c254fd7edab995","data":[{"property":"Award","dataitem":[{"type":2,"item":"Oscar"}]},{"property":"AwardSubObject","dataitem":[{"type":9,"item":"Ben-Hur#0#"}]},{"property":"Award_category","dataitem":[{"type":9,"item":"Costumes#0#"}]},{"property":"Awarded_person","dataitem":[{"type":9,"item":"Elizabeth_Haffenden#0#"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_d3a746dd4938242cbbc00fb82eca6fef","data":[{"property":"Award","dataitem":[{"type":2,"item":"Oscar"}]},{"property":"AwardSubObject","dataitem":[{"type":9,"item":"Ben-Hur#0#"}]},{"property":"Award_category","dataitem":[{"type":9,"item":"Sound_editing#0#"}]},{"property":"Awarded_person","dataitem":[{"type":9,"item":"Franklin_Milton#0#"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_d70407a6158110d6b9b841ae0a7fa5eb","data":[{"property":"Award","dataitem":[{"type":2,"item":"Oscar"}]},{"property":"AwardSubObject","dataitem":[{"type":9,"item":"Ben-Hur#0#"}]},{"property":"Award_category","dataitem":[{"type":9,"item":"Visual_effects#0#"}]},{"property":"Awarded_person","dataitem":[{"type":9,"item":"A._Arnold_Gillespie#0#"},{"type":9,"item":"R.A._MacDonald#0#"},{"type":9,"item":"Milo_B._Lory#0#"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_4ceca097c6617cf2b29db92e27722a8d","data":[{"property":"Award","dataitem":[{"type":2,"item":"Oscar"}]},{"property":"AwardSubObject","dataitem":[{"type":9,"item":"Ben-Hur#0#"}]},{"property":"Award_category","dataitem":[{"type":9,"item":"Score#0#"}]},{"property":"Awarded_person","dataitem":[{"type":9,"item":"Mikl\u00f3s_R\u00f3zsa#0#"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]},{"subject":"Ben-Hur#0##_6e0c913d91b1eb1c4f4e577fed7dbe7e","data":[{"property":"Award","dataitem":[{"type":2,"item":"Oscar"}]},{"property":"AwardSubObject","dataitem":[{"type":9,"item":"Ben-Hur#0#"}]},{"property":"Award_category","dataitem":[{"type":9,"item":"Adapted_screenplay#0#"}]},{"property":"Awarded_person","dataitem":[{"type":9,"item":"Karl_Tunberg#0#"}]},{"property":"_SKEY","dataitem":[{"type":2,"item":"Ben-Hur"}]}]}],"serializer":"SMW\\Serializers\\SemanticDataSerializer","version":0.1}}

Source: smw:Ask API#BrowseBySubject

Parse wikitext

Sideloading

Rationale

  1. Get properties via SMW API
  2. Parse json to get url/filename from property
  3. Sideload image with pywikibot's upload.py
  4. Modify Template:Movie to use this image if exists

Source:

Name and description

Ben-Hur

python pwb.py upload.py -keep -filename:syPMBvvZsADTTRu3UKuxO1Wflq.jpg -noverify http://image.tmdb.org/t/p/w396/syPMBvvZsADTTRu3UKuxO1Wflq.jpg "{{location|Shows=Ben-Hur}}"

File:syPMBvvZsADTTRu3UKuxO1Wflq.jpg

Primer

python pwb.py upload.py -keep -filename:pYiAYDn3ltw9Fq7izODuq7oWYwX.jpg -noverify http://image.tmdb.org/t/p/w396/pYiAYDn3ltw9Fq7izODuq7oWYwX.jpg "{{location|Shows=Primer}}"

File:pYiAYDn3ltw9Fq7izODuq7oWYwX.jpg

Everything Is Illuminated

python pwb.py upload.py -keep -filename:A3uFw8whRO8Td2pkTRMGlbIh4Op.jpg -noverify http://image.tmdb.org/t/p/w396/A3uFw8whRO8Td2pkTRMGlbIh4Op.jpg "{{Location|Has caption=[[Everything Is Illuminated]] poster|Shows=Everything Is Illuminated}}"

File:A3uFw8whRO8Td2pkTRMGlbIh4Op.jpg

Misc