Skip to content
Advertisement

web-scraping error message: ‘int’ object has no attribute ‘get’

Hello Stack Overflow contributors!

I want to scrape multiple pages of a news website; it shows an error message during this step

JavaScript

The error message is

JavaScript

The lines of code are

JavaScript
JavaScript

More specifically, this page and pages next to it are what I want to scrape:

https://nypost.com/search/China+COVID-19/page/1/?orderby=relevance

Any helps would be greatly appreciated!!

Advertisement

Answer

For me this code runs okay. I did have to put request inside your function. Make sure you do not mix up the module requests with your variable request.

JavaScript
Advertisement