javascript - Portia Scrappy fails to load responsive -
i installed portia on machine crawl content interactive supporting it. found headless browser, splash, can not load responsive images, i.e www.bbc.com
i knew portia removes javascript in html case may need render these images.
is there ways attach javascript in order to
- lookup placeholder elements
- replace placeholders transparent images
- update src attribute each image , assign best quality/size ratio url
like https://github.com/bbc-news/imager.js ?
i found function in portia project did not point, please give me hints try
def populate_window_object(self): main_frame = self.tab.web_page.mainframe() main_frame.addtojavascriptwindowobject('__portiaapi', self.js_api) self.tab.run_js_files( os.path.join(self.assets, 'splash_content_scripts'), handle_errors=false)
Comments
Post a Comment