Topic on Project:Support desk

Jump to navigation Jump to search

Help understanding fetching resources

4
Manan jethwani (talkcontribs)

hey everyone , I am working on scrapping wikipedia pages I am easily able to fetch html content and fetch all resource mentioned in script tag in this html but when I try to view those page I am getting error undefined function me.hook I have scrapped startup script which consist of most of the things related to mw object but mw.hook is not present there I found out mw.hook is defined in wikimedia.base.js but I can't seem to understand how it is being fetched like have a look at this article -> https://ru.wikipedia.org/wiki/%D0%A2%D0%B0%D1%80%D0%B0%D0%BD%D1%82%D0%B8%D0%BD%D0%BE,_%D0%9A%D0%B2%D0%B5%D0%BD%D1%82%D0%B8%D0%BD#%D0%A0%D0%B5%D0%B6%D0%B8%D1%81%D1%81%D1%91%D1%80%D1%81%D0%BA%D0%B8%D0%B9_%D0%BF%D0%BE%D1%87%D0%B5%D1%80%D0%BA

looking at the sources I could find only 2 scripts(I successfuly loaded those 2) and startup script has mention of baseModule wikimedia.base.js but how is it fetching it exactly and one more thing are these base modules (wikimedia.base.js and jquery) required in all mediawiki pages and should I scrape them always If I am trying to scrape any mediawiki file?

P.S. -> sorry if wrong place ,new here

Bawolff (talkcontribs)

ResourceLoader has some background info.

Modules are loaded dynamically, sometimes from LocalStorage based cache.

2405:201:300B:81A6:5BDB:3BD0:4DC5:78BE (talkcontribs)
Manan jethwani (talkcontribs)

and please let me know where is everything related to mw object stored I am getting many errors in different parts that are related to mw object

Reply to "Help understanding fetching resources"