Giter Club home page Giter Club logo

web-scraping's Introduction

web-scraping-truyenyy.com

Using python3-bs4 to scrape truyenyy.com so I can read it offline.


This program uses BeautifulSoup4 to get all the chapters of a certain series on truyenyy.com. The URL is built-in to the program. You only need to supply the following to main():

  1. Name of the story to construct the URL e.g. "quan-than" as in https://truyenyy.com/truyen/quan-than/chuong-1830.html.
  2. Name of the file to save to (preferably HTML)
  3. Also change the search parameter in extractTitle and extractContent to get those items. They change based on the page source and client you use. Your browser might show one thing but the program might show another thing. Just print out the soup on line 142 to see what's in it.

I might add more scrapers to other sites if time permits.

The URL and html tag might change so you will need to modify the parameter of find() function to get the correct data.


web-scraping's People

Contributors

ecigar13 avatar

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.