problems with webread command

10 ビュー (過去 30 日間)
Mariano Mastrogiorgio
Mariano Mastrogiorgio 2020 年 11 月 6 日
回答済み: Puru Kathuria 2020 年 11 月 25 日
Hello,
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?
Thanks!
--------------
Error using webread (line 122)
Error connecting to
http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sect2=HITOFF&p=1&u=/netahtml/PTO/srchnum.html&r=1&f=G&l=50&d=PALL&s1=8500052.PN.:
Recv failure: Connection was reset
Error in mfile3 (line 18)
code = webread(patent1_web,options);
---------------

回答 (1 件)

Puru Kathuria
Puru Kathuria 2020 年 11 月 25 日
Hi,
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');

カテゴリ

Help Center および File ExchangeWeb Services についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by