Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6186021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:48:59+00:00 2026-05-24T01:48:59+00:00

Is there anyway to load a URL via Python and then retrieve a list

  • 0

Is there anyway to load a URL via Python and then retrieve a list of all of the images that were loaded via that URL? I’m essentially looking to do something similar to TamperData or Fiddler and retrieve a list of all images that a given website loaded.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T01:48:59+00:00Added an answer on May 24, 2026 at 1:48 am

    Interesting task. Here’s one way of solving it, along the line suggested by Jochen Ritzel.

    It uses pylibpcap instead of pycap. Personally, I find pycap to be hard to work with due to little amount of documentation available. For pylibpcap, you can translate most code directly from the libpcap examples (see for example this tutorial for a nice introduction). The man pages for tcpdump and pcap are also great resources.

    You may want to look at the standards for Ethernet, IPv4, TCP, and HTTP.

    Note 1: The code below only prints out the HTTP GET requests. Filtering out the images and downloading them using the urllib module should pose no problem.

    Note 2: This code works on Linux, not sure what device names you need to use on Windows/MacOS. You’ll also need root privileges.

    #!/usr/bin/env python
    
    import pcap
    import struct
    
    def parse_packet(data):
        """
        Parse Ethernet/IP/TCP packet.
        """
        # See the Ethernet, IP, and TCP standards for details.
    
        data = data[14:] # Strip Ethernet header
    
        header_length = 4 * (ord(data[0]) & 0x0f) # in bytes
        data = data[header_length:]  # Strip IP header
    
        dest_port = struct.unpack('!H', data[2:4])[0]
        if not dest_port == 80: # This is an outgoing package
            return
    
        header_length = 4 * ((ord(data[12]) & 0xf0) >> 4) # in bytes
        data = data[header_length:] # Strip TCP header
    
        return data
    
    
    def parse_get(data):
        """
        Parse a HTTP GET request, returning the request URI.
        """
        if data is None or not data.startswith('GET'):
            return
    
        fields = data.split('\n')
        uri = fields[0].split()[1]
    
        for field in fields[1:]:
            if field.lower().startswith('host:'):
                return field[5:].strip() + uri
    
    
    def packet_handler(length, data, timestamp):
        uri = parse_get(parse_packet(data))
        if not uri is None:
            print uri
    
    
    # Set up pcap sniffer
    INTERFACE = 'wlan0'
    FILTER = 'tcp port 80'
    p = pcap.pcapObject()
    p.open_live(INTERFACE, 1600, 0, 100)
    p.setfilter(FILTER, 0, 0)
    
    try:
        while True:
            p.dispatch(1, packet_handler)
    except KeyboardInterrupt:
        pass
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way that I can use C# to load and then render
Is there anyway i can fool the Jquery .load Same origin policy? The closest
Is there anyway to combine all resources into a single exe file such as
$('tr td:first-child').click(function() { var value = $(this).text(); // $(#showgrid).load('/Product/List/Item/' + value); $(#showgrid).load('<%= Url.Action(Item, List)
Is there anyway to reload just the AJAX request, so that it updates the
Is there anyway to make a div box shake on page load? Like maybe
I have a stream URL that I load in my application.However i am not
is there any way to load url and to manipulate the page dom without
Is there any way to load a swf file and display it in a
Is there anyway to have a sort of virtual static member in C++? For

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.