Fungování této stránky je z důvodu údržby dočasně omezeno. Pokud žádný článek nápovědy nevyřeší váš problém a potřebujete se zeptat na další řešení, napište nám na Twitter @FirefoxSupport nebo Reddit /r/firefox.

Prohledat stránky podpory

Vyhněte se podvodům. Za účelem poskytnutí podpory vás nikdy nežádáme, abyste zavolali nebo poslali SMS na nějaké telefonní číslo nebo abyste sdělili své osobní údaje. Jakékoliv podezřelé chování nám prosím nahlaste pomocí odkazu „Nahlásit zneužití“.

Zjistit více

A terminal way to download source code of a page

  • 5 odpovědí
  • 2 mají tento problém
  • 126 zobrazení
  • Poslední odpověď od rayeshman

more options

Hi, I want to find a way to download source code of a page and Problem is, when I try to download html, which is generated by js. so I want to save(and change+ firefox generated source code automatically by an script, But don't know how. Thanks.

Hi, I want to find a way to download source code of a page and Problem is, when I try to download html, which is generated by js. so I want to save(and change+ firefox generated source code automatically by an script, But don't know how. Thanks.

Zvolené řešení

Just used phantomjs

Přečíst dotaz v kontextu 👍 0

Všechny odpovědi (5)

more options

Does File > Save Page As not work? You should be able to load the page and then read the source code with a plain text editor.

more options

You may be interested in Firefox's built in tools

more options

If a page is generated via JavaScript then probably your option to get the generated source would be to save the rendered page in a browser. You can't do that in a terminal window AFAIK via command line arguments, but you can open the page.

more options

To save the "rendered" source, in the past, I've used this approach (Windows keyboard shortcuts):

  • Select all using Ctrl+a
  • right-click > View Selection Source
  • Ctrl+S to save from the source viewer

Another way is to use the Inspector (right-click the page > Inspect Element), scroll to the top of the HTML pane, right-click the html element, and choose Copy Outer HTML. Then you can paste into the editor of your choice.

Actually, I haven't compared the two. Hmm...

Edit: I didn't really understand the "terminal" part when I posted this. Never mind.

Upravil uživatel jscher2000 - Support Volunteer dne

more options

Zvolené řešení

Just used phantomjs