Category Archives: HTML

How to Extract links from a Webpage

Turn this…


into a neat file with clean links…


Things you need:

  1. A web browser
  2. A webpage from which to extract links
  3. An online tool to automatically extract the links
  4. A program to open .csv files (Excel/Google Sheets/free alternative, etc.)

Hint: If you only need links from a portion of the page use Firefox.  It allows you select a portion of the page and view only the “selection source” instead of the entire page.


  • Navigate to the desired webpage in your favorite browser
  • View and copy the page source
    • Chrome: “View page source”
    • Firefox: “View Page Source” or “View Selection Source”
  • Paste the copied html into an online tool and click the button to generate a CSV file with the resulting links
  • Download, open, & enjoy!

Once the file is open you can do more other things in Excel like sorting by Domain or removing duplicate links.

Online Tool for Extracting Links from webpages:

Regex to extract two letter words

Extracting the two letter words from Wiktionary Category:English two-letter words

Online, interactive regex tester:

Regex (will grab all 2 letter words including the explanation portion (in, of)):


Source Text:



Regex for grabbing from HTML (this will only result in the 2 letter words that are links:

Page source:

Result: content text is available under the Creative Commons Attribution-ShareAlike License

YouTube NoCookie CORS issue

In doing some CSP (Content-Security-Policy) testing I noticed what appears to be CORS (cross-origin resource sharing) issue between and

The errors:

  • XMLHttpRequest cannot load No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘’ is therefore not allowed access.
  • XMLHttpRequest cannot load×360&host=ca-host-pub-5944971763221149&ht_id=6026736&hl=en&ea=0&image_size=450×50%2C468x60&ad_type=text_image_flash&eid=41351017&u_tz=-360&u_his=10&u_java=false&u_h=768&u_w=1366&u_ah=728&u_aw=1366&u_cd=24&u_nplug=5&u_nmime=7&dt=1455234283188&unviewed_position_start=1&videoad_start_delay=0&osd=2&frm=2&sdr=1&t_pyv=allow&min_ad_duration=0&max_ad_duration=110000&ca_type=flash&video_doc_id=yt_g8FhoLmU160& No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘’ is therefore not allowed access.

Noticed by others:

How to figure out the location where a form posts

If you are trying to figure out where a form posts (for instance to see whether or not it submits information securely) and the post location isn’t readily view-able in the page source, here is how to do it:

Using Firefox, (download if necessary) open Firebug.

Download Firefox

Download Firebug

Hit Ctrl+Shift+C to open the console.

Switch to the Net tab and submit the form.  (The console window needs to be open before you hit submit.)

In the list window you should see a POST request with the endpoint and the complete information about the request including Headers, Post, Response, JSON, Cache, and Cookies.

You can copy the endpoint location by right clicking and selecting Copy Location.

20150917 Superlogout Page Source