Coder Social home page Coder Social logo

joshdabosh / webtoons Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 0.0 33 KB

Python3 version of webtoons.py file from Galactus03/webtoons, with some more resiliency and functions better as a module

License: MIT License

Python 100.00%
python3 bs4 webscraper-website comics-scraper webtoons

webtoons's Introduction

Webtoons site scraper, for Python 3

Note: this module was based off of this repository for Python2. Big thanks to @Galactus03!

I added more resiliency to the functions, transferred all code to Python3 syntax, fixed quite some bugs, and made it return results.


This module has these functions:

popularity_age(age, sex, toShow) -> takes in parameters age, sex, and toShow. If not given, random.choice chooses age and sex, and toShow defaults to integer 5. Returns list of toShow amount of the most popular webtoons based on age and sex.

author_comics(author) -> takes in parameter author. Returns list of all comics that the specified author has created.

new_releases(toShow) -> takes in parameter toShow. Returns list of toShow amount of webtoons that were updated today

top10_of_day() -> takes in no parameters. Returns list of the top 10 most popular comics today.

best_rated(toShow) -> takes in parameter toShow. Returns list of toShow amount of the most popular webtoons.

top_in_genre(g, toShow) -> takes in parameters g and toShow. Returns list of toShow amount of the most popular comics in genre g.


INSTALLATION DIRECTIONS (pip)

To install, simply run
sudo pip3 install webtoons

to install webtoons (this module!), requests, and BeautifulSoup4, which are dependencies.

ALTERNATE INSTALLATION DIRECTIONS (cloning)

Clone the repository and install it:
git clone https://github.com/joshdabosh/webtoons.git
cd webtoons
sudo python3 setup.py install

USE

To use, simply start an instance of webtoons and run a few functions!
import webtoons
wt = webtoons.Webtoons()
print(wt.top10_of_day())
# prints the top 10 comics of the day

Comments or suggestions are welcome!

webtoons's People

Contributors

joshdabosh avatar

Stargazers

 avatar

webtoons's Issues

Cancer

All of the functions return a string “cancer”
Is this a bug
Or a feature?

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.