alvarobartt / investpy

Financial Data Extraction from Investing.com with Python
https://investpy.readthedocs.io/
MIT License
1.59k stars 374 forks source link

Scraperlink api webdevzilla #637

Closed jdb130496 closed 2 months ago

jdb130496 commented 2 months ago

@webdevzilla

I am opening this issue here as I saw your method in one of the responses to earlier issues.

I am trying to use your api. I am following your #1 method as stated here:

https://api.scraperlink.com/investpy/

I have tried as under:

http://api.scraperlink.com/investpy/?email=someone@gmail.com&url=https%3A%2F%2Fapi.investing.com%2Fapi%2Ffinancialdata%2Fhistorical%2F7%3Fcountry%3Dindia%26symbol%3DHCLT%26start-date%3D01%2F01%2F2018%26end-date%3D03%2F31%2F2024%26time-frame%3DDaily%26add-missing-rows%3Dfalse

I get response in browser as:

"Failed to derive response"

Can you please guide me what wrong am I doing?

webdevzilla commented 2 months ago

Here you go: http://api.scraperlink.com/investpy/?email=someone@gmail.com&type=historical_data&product=stocks&country=india&symbol=hclt&from_date=01/01/2018&to_date=03/31/2024

jdb130496 commented 2 months ago

Yes, thank you @webdevzilla . But that is your #2 method as per the guidance I read on your above site. I wanted to use #1. One example you have mentioned (Example: http://api.scraperlink.com/investpy/?email=your@email.com&url=https%3A%2F%2Fapi.investing.com%2Fapi%2Ffinancialdata%2Fhistorical%2F7%3Fstart-date%3D2022-09-29%26end-date%3D2022-09-29%26time-frame%3DDaily%26add-missing-rows%3Dfalse) in above format in the beginning but that is general. I wanted that method to be used for specific scrip and country.

Another issue is: symbol ZYDU (Zydus Life Sciences) returns that symbol is not found although I can see that data for the scrip when I access it through browser directly (https://in.investing.com/equities/cadila-healthcare-historical-data). Whether that is your API issue or inherent issue of investing.com site?

jdb130496 commented 2 months ago

@webdevzilla I even tried this way:

https://api.scraperlink.com/investpy/?email=someone@gmail.com&url=https%3A%2F%2Fapi.investing.com%2Fapi%2Ffinancialdata%2Fhistorical%2Fstocks%3Fcountry%3Dindia%26symbol%3DHCLT%26start-date%3D2018-01-01%26end-date%3D2023-12-31%26time-frame%3DDaily%26add-missing-rows%3Dfalse

It returned:

{"data":null,"summary":{"last_highest":"","last_lowest":"","last_difference":"","last_avarage_total":"","last_change_percent":""}}

(blank data) in browser.

Can you please let me know where I am going wrong?

jdb130496 commented 2 months ago

@webdevzilla

Never mind. I just discovered another way - using investing id to scrape in combination with above method: https://api.scraperlink.com/investpy

Thank you. Still acknowledge your efforts and contribution. Closing the issue for now.