How to download PDF files through web crawler on heroku? - html

I am confused with downloading files on Heroku. Where will the pdf file goes if I use Selenium and click the download button? Can I choose where the files to go?
If it can not work, is there any method that I can use?
I am using Python Selenium to browse pdf files on a website (because that website uses Javascript onclick method to download the file but not using href in "a" tag, so it is hard to use something like Beautifulsoup or Request to download it)
I hope this crawler program is always online, so I think I should put it on Paas such as Heroku.
When users make a request to it, it will go download files and return them.

Related

Uploading HTML/CSS Files in bulk to squarespace

Hi Stack Overflow community,
I'm a bit of a noob here (please be gentle) and wanted to ask how to upload HTML/CSS + Packages in bulk to my site.
I'm familiar with the code injection/CSS editor within Squarespace, but something doesn't seem to be working.
To summarize, I received a bunch of files and was requested to upload them to the website I manage. These files contain:
HTML (by page)
CSS (by page)
image files
index.html
Scripts file (which include .js & .php
sitemap.xml
That being said, I know there is a lot of referencing between these files and wanted to know the best route in incorporating these into my site?
Thanks so much!
A quick way to upload multiple files is to use the (S)FTP protocol. You can use an FTP client such as FileZilla to upload files in bulk to your server.
However, I'm not quite sure if that's possible in your use case. Are you using Squarespace for your project? If so, it looks like you can use either Git or SFTP for file uploads. You'll need to have developer mode enabled for that, though.
I found this article that goes into uploading multiple files to Squarespace via their own upload system, does that help?

Azure website hiding .html extensions

Im hosting a couple of html files using an Azure website. I want to hide the .html file name extensions. I have been looking trough the site however i didnt find an options that works specifically with Azure websites.
You could use a URL Rewrite in the web.config file for an ASP.NET application to send a 404 or some other response for .html file requests.
Also, you could probably set up a custom HTTP handler mapping for .html extensions. That way a language processor could intercept those requests instead of just serving the file.

How to write a blob to a file in Chrome apps?

I am developing a chrome app which can download videos from server, save it locally and display it when user wants to. I am able to get the blob using xhr from server, but I do not know how to write it to a file, I am using Chrome.file system api. No luck. Any links to tutorials on using file write api ?
Take a look fileSystem API
Chrome Dev Editor uses it.

How to write Files from a HTML File in a DropBox

My knowledge about Web technologies is very low and I just wanted to know if the following scenario would be possible with HTML5 and Javascript:
If I host an HTML file in Dropbox and send this link to seomeone, would it be possible that this HTML file creates a new file in my Dropbox? For exampe the HTML file is a form that one can fill out, can the HTML file create a text (.txt) file with the form content?
As far as I understand, the HTML file has to be hosted by a webserver and has to allow Javascript or PHP to achieve this. But maybe there is a way to just use an HTML file, a dropbox and a browser?
Any hints what topics I should study to achieve this goal?
On what I've understood from Dropbox, it does not directly show you the file contents in any manner. You can store files there, but the only thing you can see when opening a link that directs to the file, is the page which allows you to download the file to your own PC and save it.
This would seem like an impossible thing to achieve, in any cloud service like Dropbox it would seem. I would recommend you to just get the web hosting service, they are usually not that highly priced after all.
You could do this, but you shouldn't. To make this work, you'd have to use the Dropbox API to upload files, and you'd have to embed in your web page an access token for your account. That means anyone who looked at the source of your web page could get access to make changes in your account (e.g. delete all your files). So there's no safe way to do this without a server-side component (like PHP).

Best tools to download all the html files from a website, and to re-upload them

I need to add two lines of html to every page on a large website. I will be using a regex to do it.
I would like to know the best tools to download all the html files from a website, then ftp upload them back up on Windows.
Use any standard FTP program and limit transfer to files with a .html extension. Then mirror the files back up.
Or you could just download everything via FTP, make changes to only the .html extensioned files, and then upload modified files back up (should be only .html) files.
I find FileZilla a very decent cross platform FTP client.