Coder Social home page Coder Social logo

zytedata / spidyquotes Goto Github PK

View Code? Open in Web Editor NEW
30.0 8.0 15.0 228 KB

Example site for web scraping tutorials

License: BSD 3-Clause "New" or "Revised" License

Python 6.73% Julia 83.40% CSS 0.87% HTML 8.83% Shell 0.03% Dockerfile 0.11% Procfile 0.03%
scraping crawling tutorials web-scraping-tutorials web-scraping web-crawling playground

spidyquotes's Issues

templates/author.html - improperly closed H3 tag

Hello,

On line 5 of templates/author.html

<h3 class="author-title">{{ author.name }}</h2>

... note that the H3 tag is closed with H2.

As a consequence, the following Scrapy code

response.css('h3.author-title::text').extract_first()

... will return "Albert Einstein\n " instead of "Albert Einstein"

This can be seen at the end of the Scrapinghub tutorial at

https://www.youtube.com/watch?v=JW_FxkSohkA

Of course, one could argue that the HTML parser used by Scrapy should fix this, as Chrome has no problem with it.

Kind regards,

Stephen Turner

Footer covering tags on smaller screens

The problem

On displays with a width less than 992 pixels the footer overlaps the "Top Ten tags" section:

Footer covering "Top Ten tags"

Semitransparent footer covering "Top Ten tags"

Tested solutions

Increase margin-bottom

Increase the margin-bottom property on body to 120px.

Pros

  • No major changes to the html or the css.

Cons

  • Every time content is added to or removed from the footer margin-bottom needs updated.
  • 120 pixels was gotten empirically.

Use flexbox

Add this to main.css:

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

#content {
    flex: 1;
}

.footer {
    flex-shrink: 0;
    background-color: #f5f5f5;
}

then add the id="content" attribute to base.html:

<div id="content" class="container">
...
</div>
<footer class="footer">
...
</footer>

Pros

  • No need to update when the footer changes.

Cons

  • Not supported by older browsers: Can I use
  • Requires a minor change to the html.
  • Requires a major change to the css.

Feedback wanted

Any feedback on which solution to use or other possible solutions is appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.