How do I get a wikipedia picture inside a app

0 favourites
  • 1 posts
From the Asset Store
An educational game for counting pictures. An easy to use template for developers to build larger games
  • i know it sounds simple well its not as im not talking about copy pasting it like importing stuff... but more auto updating a picture based on different topics like lets say the presidents in the world pictures which usually are on the 2nd or 3rd row in right side in the posts searched as "Country name - President"

    so im trying to make a memefull type of app.. which require this feature... basically i need a reliable source for each year.. or whenever the president is changed so i dont have to upload any files or change nothing to the app itself.. but get the link from wikipedia posts... see my point?

    even though wold be much easier to just host the images myself... and update it via ajax calls... but i want to avoid that. since im probably going to never revisit this app ever again after i publish it.

    the only problem is ... the images on wikipedia are having a link similar to this,_March_2015,_Brussels_(cropped).jpg
    etc etc 
    see the issue? there is no pattern to follow. like president picture link folder: presidentsnapshot.jpg which should be general for all but in countries different name media folder.. big issue.
    i was thinking to find the .jpg file then search for a key word in its name like president... but as you can see above... for romania there is no president mentioned in the .jpg name... so its a frustrating issue and i think i answered myself when i mentioned the ajax... but if you have any ideas let me know  are more then welcome.
    Edited... i did found a html5 code for the area div box that are globally used for the president pic... and i could just load the file that way based on their div container [code:lrojzikq]<td colspan="2" <---- this repeats on all pages... but have no idea to smoothen the search for that trough C2---------im not even sure if that is even possible in find the page div with colspan=2 then inside that div load the .jpg that is present there without knowing the name of the jpg, but only the extension format .... challenging right? in websites i wold crawl that thing simple fetching data but C2 is a bit weird when it comes to that... the double brackets thing makes it 1000 times harder for code to implement.... [/code:lrojzikq]
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)