1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help me to find basic design for a web project

Discussion in 'Programming' started by stax76, Oct 8, 2022.

  1. #1
    My use case is rather uncommon. I use a website every day and waste much time there because the site presents a lot of duplicated content. I would like to build an application that hides the duplicated content. What I'm not sure is what design I need because I never did a web or database project.

    I'm the only person who will use the application. There are 10-20 new pages a day, each with 15 items and the majority is duplicated content with minor differences, over a timeframe of years there might be many items. For every shown item on the site, I want to have a button 'Hide this item in the future' to prevent this item to be seen in the future.

    A design I believe that could work is:

    Scrape the content of the site.
    Build and present an own page/site using a web server.
    Use a database to manage the unwanted items.

    Would this work, or might there be a simpler solution?

    Example item:
    <article>Delicious salad recipe</article>
     
    stax76, Oct 8, 2022 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #2
    that should be relatively simple, depending on the site that you're scraping and how static it's design is - some of the big sites are constantly tweaking their layout and that can break tools we build.

    It'll be easier to do for a desktop browser than for mobile or tablet.

    What I'd do:
    1. install greasemonkey, tampermonkey - name varies depending on your browser
    2. create a new user script
    3. for each article add a "hide" button
    4. add a listener for the hide buttons based on class name
    5. when you click the button add the id of the article to your browser's local storage
    6. add in code that gets the ids from local storage when the page loads
    7. return to the code in #3, if the article id is in the list of hidden ids then hide the article, else add the hide button
    The list of hidden ids may, over time, become too large, so you may want to add a year-month to the ids and only get the lists for the last x months. I'd get it working first though and worry about that later on.
     
    sarahk, Oct 9, 2022 IP
  3. stax76

    stax76 Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    Thanks, your answer was very helpful, I followed your suggestion and used Tampermonkey and localStorage to store the data.
     
    stax76, Oct 10, 2022 IP
  4. stax76

    stax76 Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4
    Web design and development isn't exactly one of my specialities, but certainly something I want to learn more about, it took me many hours to write 200 lines of JavaScript code, lots of room for improvement. It's also a long time since the project before, and I tend to forget quickly.
     
    stax76, Oct 11, 2022 IP