• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics in ~comp with the tag "python". Back to normal view / Search all groups
    1. Coding Noob Needs Help/Guidance on Small Project

      Hi, There's a certain site which hosts media files and has a player that depends on a lot of third-party resources to play, while browsers have native support for those file types. Those 3rd-party...

      Hi,

      There's a certain site which hosts media files and has a player that depends on a lot of third-party resources to play, while browsers have native support for those file types. Those 3rd-party resources are often blocked by ad blockers and I have no desire to white-list them. I would like to extract the direct link to the media file and make it playable on my custom web page.

      The link to the media file is present in the page source of each page, always on the same line. It's not anchored in HTML but present in the JavaScript for the player, like so:

          $(document).ready(function(){
            $("#jquery_jplayer_1").jPlayer({
              ready: function () {
                $(this).jPlayer("setMedia", {
                  [ext]: "https://[domain]/[filename.ext]"
                });
              },
      

      In this example it's on line #5. [ext] = the file extension.

      I want to build the following:

      • A web page with a form with a single input field meant to receive links from that specific file host
      • [Something] that extracts the file link from the source of the host's page
      • Present the linked file as playable in an embedded native player

      So far I've managed to create a form with an input box and a submit button, but it doesn't do anything yet. What is the best way to build the actual functionality? I know HTML/CSS. I have some rudimentary understanding of JavaScript/jQuery and Python3, so those would be my preferred tools.

      For those worried about piracy: The files in question are not copyrighted and I'm not looking to make copies. I just want to make them playable. This is for personal use.

      Thank you for reading this far. Any and all advice is welcome!

      10 votes
    2. Are Python virtual environments comparable to Docker containers?

      I've been trying to understand Docker and while also learning Python it occurred to me that virtual environments seem to be the same thing. They're probably not, but can anyone shed some light on...

      I've been trying to understand Docker and while also learning Python it occurred to me that virtual environments seem to be the same thing. They're probably not, but can anyone shed some light on this?

      6 votes
    3. News Desk Updated!

      A few weeks ago I posted a project I was working on to read news from the command line. I incorporated the suggestions given in that thread (license, requirements.txt, etc), incorporated...

      A few weeks ago I posted a project I was working on to read news from the command line. I incorporated the suggestions given in that thread (license, requirements.txt, etc), incorporated suggestions I've received elsewhere, and added a few features.

      Here's the updated link: News Desk

      Any feedback would be much appreciated!

      Edit: And a specific point for feedback. I store the user's API key in ~/.nd_config/key which I think is a step up from requiring the user to set their key as an environment variable (which is how I had it originally). Still though, is there some way I can not store the key in plaintext and still have it in a format that is readable by the computer and can be used to verify API access?

      7 votes
    4. Python web developers - what is your favorite framework?

      As some of you may know, Tildes is written in Pyramid. I've done some OSS work in Pyramid and Flask, but my paid web dev work the past few years has been mostly in Django. There are some newer...

      As some of you may know, Tildes is written in Pyramid. I've done some OSS work in Pyramid and Flask, but my paid web dev work the past few years has been mostly in Django. There are some newer frameworks out there like Sanic or Falcon, and some older ones like Zope, CherryPy and Turbogears, that I've played with but have no real experience in.

      Personally, I like Django for its "batteries included" and its big ecosystem, Flask for its minimalism and Pyramid for its elegant design. There's no single framework that fits all needs and all have their share of annoyances - Django can be quite difficult to swap out things like the default ORM or template system (though these have gotten better in recent versions), Flask has some architectural issues with request and other global variables, and Pyramid perhaps suffers from a relatively small ecosystem and lack of "one way to do it".

      What are your experiences and preferences?

      9 votes
    5. I made a thing: News Desk

      I've only been seriously programming for about a year now (and mostly in R), but I've been digging into Python for the past few months. Mostly I use pandas/numpy/scipy/scikit-learn, etc. for data...

      I've only been seriously programming for about a year now (and mostly in R), but I've been digging into Python for the past few months. Mostly I use pandas/numpy/scipy/scikit-learn, etc. for data analysis and some ML stuff, but in an effort to expand my skills I've also been playing around trying to build a few projects.

      It's not much, but I built this: News Desk

      Feedback is welcome. One bug that I'm aware of is that when you refresh the program, the url_list isn't cleared and the URLs from the refreshed articles are just appended to the list. So even though only 20 articles will show, you can select, for example, article 35.

      11 votes