Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3280 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I am trying to do some web scraping from the Yahoo! Finance site, the content I get back says the document has moved "The document has moved <A HREF="http://finance.yahoo.com/q?p..." etc with Insert from URL. If I use the same URL in Open URL, that I put in the Insert from URL function, the site is opened perfectly. Do some sites not work with Insert From URL? When I was testing the script it seemed like I was able to grab the source at one time, is the Yahoo URL dynamic?

Thanks

Posted
4 hours ago, laguna92651 said:

is the Yahoo URL dynamic?

If you don't provide the URL, how are we supposed to know?

 

4 hours ago, laguna92651 said:

Do some sites not work with Insert From URL?

All sites "work" with Insert From URL. But web scraping using Insert From URL will not work with all sites. All that the step does is insert the HTML code of the linked page. If the page redirects, then you will end up with a field containing the redirecting code.

Posted (edited)

Well, this is "interesting". If I run cURL with the above URL, I get the expected page. However, If I run the same URL inside the BE_GetURL() external function (using the BaseElements plugin), I get the "The document has moved ... " message - although, according to the documentation, this function uses the cURL library.

I don't know what causes the differences in response. I do, however, have a suggestion: try to get your data through an API, if at all possible, and use web scraping only as the last resort, when no API is available.

---

BTW, I seem to get the same page using only http://finance.yahoo.com/q?s=^GSPC - and this works the same with both methods.

Edited by comment
Posted

A response "The document has moved ... " is a server generated http error (302) and indicates that the document that used to be on that url has moved to a new url. The server generally includes that new url and most browsers will use that to load from there instead.

Whether or not the url is dynamic is a question better asked Yahoo.

Posted

I didn;t mean for you to google it, I thought you just might have something handy. I'm not even sure I would know what to google for, other than Filemaker API. Thanks for you help I appreciate it.

This topic is 3280 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.