I'am searching for downloading Microstrategy Dossiers as in ".mstr" file format with python. I could not find any online source to do it.
I have tried "requests" and "mstrio-py" libraries, but those does not seems to be working.
There is a function called "export_document_to_mstr" in mstrio.project_objects.document in Document. That requires "body" in json format and "instance_id" which I could not find.
I wonder if is there anyone give me ideas ?
Thanks a lot in advanced !
Related
I am working on Python3.4.4
I tried to use a Merriam-Webster API, and here is an example link:
http://www.dictionaryapi.com/api/v1/references/collegiate/xml/purple?key=bf534d02-bf4e-49bc-b43f-37f68a0bf4fd
There is a file under the tag, you will see after you open the url.
And I am wondering that how can I retrieve that wav file......
Because it is kind of just a string to me......
Thank you very much!
Okay, I just sort it out.
Usually you need to look at the instructions for the API, I look it up on the official website and it tells you that how you are going to retrieve that. In this case you are going to another url, and then wala
Here is what I'm trying to do: through a python script, I would like to get the first 5 pages of results of a Google search and save them as PDF files in a folder.
What do you suggest ?
(1) I start by parsing the HTML pages one by one and then find a tool to convert them into PDF ?
(2) I find a way to direclty do all the step in one through a mod which I don't know yet ?
Thank you very much in advance for your insights !
Use the standard Python library to download the file(s). Then you can use http://www.xhtml2pdf.com/ to convert the pages to PDF.
Note: Most web pages uses a lot of JavaScript to do all kinds of magic. So for many pages, only a full-blown web browser will get you nice/useful results. If you run into this problem, then there is no pure Python solution. Try phantomjs as explained here:
phantomjs rasterize.js 'http://en.wikipedia.org/w/index.php?title=Jakarta&printable=yes' jakarta.pdf
PS: I found these solutions by googling for python convert html to pdf You should try it once in a while.
I am working on a project that needs to do a search on the internet (i.e. stack overflow). Retrieve all relevant results (URL, text, images paths) from the crawler from the search to an XML file. I am building it with python. Does anyone have any suggestion as to how i should approach this problem? I don't want to scan through the entire web, just top relevant results (stackoverflow, 10/08/2013, python as an example)
for stackoverflow you can use the api directly
for example:
https://api.stackexchange.com/2.1/questions?fromdate=1381190400&todate=1381276800&order=desc&sort=activity&tagged=python&site=stackoverflow
see https://api.stackexchange.com/docs/questions#fromdate=2013-10-08&todate=2013-10-09&order=desc&sort=activity&tagged=python&filter=default&site=stackoverflow
you can't making more 30 requests a second see http://api.stackexchange.com/docs/throttle
It sounds like you could use BeautifulSoup. And check out this thread, it sounds like it's what you need. Creating an XML document with BeautifulSoup: StackOverFlow
As for downloading and using BeautifulSoup, the site is here
It's pretty simple to use.
Hope this helps.
I'm building a web form to accommodate users uploading .obj and .fbx 3D models to a site. We need a server-side solution to convert these files to Collada (dae).
It would be massively helpful if someone could point me in the right direction as I have no solid ideas yet on a possible solution. I'd like to hear what others think before I go off down one path.
I can only think something along the lines of a python/perl script triggered off by the PHP during upload?
Many thanks in advance,
I would use a Python prograam on the server triggered by PHP. I would look around for a Python library for working with Collada files (e.g. http://collada.in4lines.com/) then I would use the FBX Python SDK to convert FBX files to Collada. For OBJ maybe something like http://pygame.org/wiki/OBJFileLoader would be helpful.
Update: I recently wrote a blog post about using FBX and Python as a web server.
I'm interested in taking these census cartographic files and converting them into SVG files. So far I've found this shptosvg Perl script, but I'd really prefer to do any coding or data wrangling in Python.
Also, I know shpUtils.py can be used for parsing .shp files in Python, but I'm unaware how to take that output and create SVG paths.
Anyways, I'd definitely be interested in any advice you guys have or modules you know of.
Late response, but here is exactly what you want, in Python with a wonderful API:
https://github.com/kartograph/kartograph.py
As comments have noted it was previously available at https://github.com/svgmap/svgmap.py
The svgmap link was broken for me on github, but kartograph.py works for ESRI shp. files
Not python, but you may be interested in these links:
http://egb13.net/2009/07/shapefile-to-svg-translator-project/
http://www.carto.net/svg/utils/shp2svg/