lotus-1 / TechnicalData

Adding data from Guardian
0 stars 1 forks source link

Splitting the url to get the title #10

Open shiryz opened 5 years ago

shiryz commented 5 years ago

I'm not sure why you do that https://github.com/lotus-1/TechnicalData/blob/master/DOM.js#L12

instead you can get the title from the json you get as a response and that should be fairly easy as data[0][0]

Noorb7188 commented 5 years ago

The reason why we used the [3][0] is we didn't want the title to be the value of the input, we wanted it to be the Title of the link we chose to take the client to . I mean MediaWiki "converts" the word we search to a valid word which is placed in data[3][0] , and we took that as out title.