Cannot import table from this site
-
Hi! After last Tablepress update, I cannot import table from here https://api.privatbank.ua/exchangerate.html
especially this link
https://api.privatbank.ua/p24api/pubinfo?exchange&json&coursid=11Can you investigate this issue, please!
Thank you!
-
Hi,
thanks for your question, and sorry for the trouble.
I can confirm that this source does not import 🙁 Unfortunately, I don’t really know why, it seems that the server is not sending proper return types.
In addition to that, this is actually not a JSON format that TablePress expects, it’s more of a key/value format than a table format. This is by default not supported, I’m afraid.Regards,
TobiasThank you!
It is very strange because it worked well and without any issues until December 2015.
Hi,
then the reason most likely is that they either changed the responses from their servers or the format :-/
Regards,
TobiasSo, maybe you consider do add an XML import also?
Hi,
no, sorry, offering XML import is not something that I’m considering at the moment. Most public API services are moving away from it, in favor of JSON, and it would require specifying how to map the XML fields to a table again. This is not really feasible and it would not offer any flexibility at all. Thus, there’s simply no benefit here.
The best way to import data from such different sources would be to write a custom importer that converts the data to e.g. JSON, which TablePress can then import.
Regards,
TobiasI received an answer from this website https://api.privatbank.ua/exchangerate.html
They told me that “blocked my website because it uses WordPress – a very insecure system”.
What nonsense!
Hi,
wow, that is indeed an absolutely stupid response! And even if it where insecure that would never affect their product…
I hope that you can maybe convince them otherwise.Best wishes,
TobiasAfter some discussion with that site administrators, they recommended me to change CMS WordPress user-agent. Maybe you know how to do this because I’m not a developer.
Hi,
that could indeed be a neat trick.
Doing this should be possible by using a WP filter hook and e.g. placing this in your theme’s “functions.php” file:add_filter( 'http_headers_useragent', 'snezhko_change_http_user_agent' ); function snezhko_change_http_user_agent( $user_agent ) { $user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.28 Safari/537.36'; return $user_agent; }Of course, you can set any user agent there.
Regards,
TobiasDear Tobias! Yes, this really work! I wish you good mood and a huge success!
Hi,
no problem, you are very welcome! 🙂 Good to hear that this helped!
Best wishes,
TobiasP.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!
Hi Tobias,
I also seem to be experiencing import issues since the last TablePress update. The CRON is running as expected, but the tables are just not updating.
Here’s one of the tables which is not importing:
http://www.colchesteranddistrictyouthleague.com/tables/u12_a.htm
Please advise.
Thanks,
DavidHI David,
if at all, TablePress would only import the first table on that page, but even that might be problematic, due to the combined cells in the first row. Can you therefore please try if importing from this URL works if you use the regular “Import” screen and perform a manual import (instead of using the Auto Update Extension)?
Regards,
TobiasHi Tobias,
I have just tried a manual update and that is not work too.
Please advise.
Thanks,
DavidHi David,
how exactly is it not working? Are you getting error messages?
What’s the import source that you tried?Regards,
Tobias
The topic ‘Cannot import table from this site’ is closed to new replies.