problems with webread command

7 views (last 30 days)
Mariano Mastrogiorgio
Mariano Mastrogiorgio on 6 Nov 2020
Answered: Puru Kathuria on 25 Nov 2020
I am using 'webread' within several for loops to extract data from webpages (Google patents and Uspto patents website). It works perfecty for a few minutes, but then I get this error, not always in the same page: see below.
What is the problem? I changed the timeout in weboptions. I also inserted a try and catch statement, and the algorithm doesn't stop anymore but it remain stuck on the last result, as is the connection is lost and cannot be re-established.
Any idea?
Error using webread (line 122)
Error connecting to
Recv failure: Connection was reset
Error in mfile3 (line 18)
code = webread(patent1_web,options);

Answers (1)

Puru Kathuria
Puru Kathuria on 25 Nov 2020
The possible workarounds you might want to try:
  • Increase the timeout in weboptions
  • Explicitly mention the file type you are trying to read from the url. Example:
D = webread(url, 'table');

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!