Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Grab Value from Remote Website

Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, I am developing a finance application where my application will need to grab rates (forex, etc) from various banks each day. These banks publish their rates at their website. I use Java application running generic InputBufferedStream of the IO library to grab the HTML data. Most websites work. Unfortunately, there is one, which is ( website, their server refuse to respond to my program. Despite adding User Agent equals Mozilla etc. to the header of my URLConnection, I still fail to get the required data. Would appreciate help if someone knows how to. I suspect it is still the server rejecting my application as the header sent still does not match up to their acceptable format. They are rejecting spiders/crawlers. My code is as below.

Error is, the page takes a long time run this function, and after a while, it returns: Software caused connection abort: recv failed

Posts: 4179
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Subliner Kemp wrote:They are rejecting spiders/crawlers....

Your application is a crawler, and they are blocking crawlers. Have you read their terms of service to ensure that what you are doing is allowed? Either way, if they block you then there isn't much you can do about it.
The first person to drink cow's milk. That started off as a dare from this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!