I was looking for a way to write a script that will download a file from a specific website but without opening the website itself. I want everything to happen in the background.
The website is morningstar and a specific link for the example is this one:
https://financials.morningstar.com/ratios/r.html?t=MSFT
in this page, there is a "Button" (it is not really declared as a button but as a Hyperlink, the <a> tag in HTML)
I added a photo in the bottom so you can see for yourself exactly the way they wrote the code.
Anyway, I saw that when I clicked the button the href attribute actually calls a javascript function which then creates the links from which the file will be downloaded.
I am looking for a way that I can write a script and give it the link I want, for example, the link above, and the script will download this specific CSV file from that page into a folder of my choice.
I was looking at some selenium tutorials but I couldn't find much help for my specific problem.
Here's an example I use:
import requests
url = 'http://via.placeholder.com/350x150'
dashboardFile = requests.get(url, allow_redirects=True)
open('d:/dev/projects/new-wave/dashboard.pdf', 'wb').write(dashboardFile .content)
Oh, and depending on the size of the file you would want to download in chunks. A quick search of: "python download large file in chunks" will help.
I would like to run the following Code on a Website:
document.getElementById("FileLeafRef_8553196d-ec8d-4564-9861-3dbe931050c8_$onetidIOFile").value = "test";
The Problem is that I have to choose the Frame "EditForm.aspx":
In the IE I can easily choose the Frame by manually clicking on it, but I would like to do it only in JavaScript, without a Manual select.
I tried it with a
parent.frame[x]
But I think this is the wrong path...
I have a pdf file that I am putting on a website for a client. It is located here...
http://www.optiphysicaltherapy.com/dev/wp-content/uploads/2014/02/OPTI_NewPatientForms.pdf
The title should be OPTI New Patient Forms but if you look at the tab in the browser and the name at the top of the browser window it says "Coury And..."
Where can I go to change this?
The website is using Wordpress 3.8.1 and I am not sure if it is in Wordpress or in the actual pdf file.
Thank you,
Matt
Ok, So I found out how to change the meta-data in a .pdf form here: http://help.adobe.com/en_US/acrobat/X/pro/using/WS58a04a822e3e50102bd615109794195ff-7c63.w.html (dead link; archived version here)
Sure enough the Title in the Meta Data within the .pdf was "Coury And..."
Once I changed this the Tab and the Title in Firefox web browser changed to have the title that I wanted.
This shows us that the meta-data in the .pdf does show in Firefox as if it were the meta-title of the webpage when displaying a .pdf within the browser.
Open the PDF with Notepad++ and search (CTRL+F) for /Title
Change title between brackets (and leave the brackets)
For instance:
Change "/Title (OLD TITLE)" into "/Title (This is my new title)"
Save the PDF and Voila
If you have access to the Word document in which the PDF is based, you can define the title when you save the file.
Whatever was on that link, I did it opening the PDF with a hex editor (HxD) and searching Title, so I found /Title (untitled) somewhere and just edited it (changed the value between parentheses, here untitled).
no need to change in meta of pdf. just to following change in iframe url
http://localhost:8080/getDataPDF//?patientId=145. use // to solve this problem it can hide your title.
Open the PDF document in Adobe Acrobat Pro: (OR use google chrome extension)
(1) Go to Select File > Properties
(2) Select the Description tab to view the metadata in the document, including the document information dictionary
(3) Modify the Title field to add or change the document's Title entry
When you open pdf in chrome you can hit print and save as pdf. As file name write what you want as title in browser, it should be the same now.
Open File > Properties, then in the box labeled 'Title', add your title.
Click on the 'Initial View' tab, where it says Show:, make sure the drop down says 'Document Title' instead of 'File Name'. This works for Chrome, but sadly not IE yet.
For change my pdf tittle I just open it on nano terminal, or with another text editor that open the raw, and I edit the Title field.
The title can be changed inside MS Office or LibreOffice if you have access to the source by going to file/properties/description.
As another answer suggested, printing as a PDF works here if you have the source document. What the other answer perhaps got wrong was that there is an option to add a title in the print dialog.
You can also use this online pdf editor to change metadata of a pdf file.
The title does not come from the pdf. it comes from the word file you export it from.
Right click on the word file, go to details. change the title and export again
Good luck
I've been tasked with trying to add a message to the Product Compare Page which will appear if the customer has, by some stroke of stupidity, been able to access the page when there are no products to compare
now i understand there a <script type="text/javascript">window.close();</script> already in there however it seems like it doesn't work if you open a new window and type in the URL (the equivalent to bookmarking the page, how i figure is that if i put this message above the <script type="text/javascript">window.close();</script> line, if the window doesn't close the customer will get the message.
Now that part is easy enough, the hard part is the second part to my task and that's allowing this text to be changeable though the blackened much like how you can change the Logo Image Alt in System > Configuration > Design > Header.
we already have some new section in System > Configuration thanks to some custom modules however i don't want to have to create an entire module just so a department we can't trust to edited the page and not stuff it up in the process can change one line of text
So is there a way to add customizable Text to a Magento Page
You could change the javascript to window.location = '/sorry-page'; or something like that and creat "sorry-page` as a CMS page. Otherwise you will need a custom module.
I need your help to grab the source code of the page & can save it in a text file.
What actually i want!!
Instead of doing the lot of work like, right click on the page then click on view source code then to copy & paste it in a text file...
I want to make a short, i want to put a link on the page, in which i need to grab a source code, so when i just click on that link let say "Download Code" it grabs the current page source code & save it in a .txt format.
Kindly help me how can i do this?? it would be great if i can achieve this by using a java script, i don't want to use server side programming language.
I tried data URI but dont get the exact what i need
I find some thing on the below link:
http://css-tricks.com/examples/ViewSourceButton/#