NGScrape
Newgrounds game scraper made with beautifulsoup4 and requestslib.
NGScrape is licensed under the GNU Affero General Public License v3.0. If a copy is not included with this file, you can find one at https://www.gnu.org/licenses/agpl-3.0.en.html.
Please star is this was useful!
Functions:
__init__(self, debug: bool = False, cache: bool = False, parser: str = 'html.parser') -> None- Start a new NGScrape Instance.
- Parameters:
- debug (bool) = False: Enable/Disable debug mode
- cache (bool) = False: Enable/Disable caching
- parser (str) = 'lxml': Parser used by BS4
- Parameters:
- Start a new NGScrape Instance.
scrape_game(url: str, download: str, filename: str) -> None- Scrape a flash game by url. Returns the URL for the swf.
- Parameters:
- url (str): The URL of the flash game. For example, the URL for Alien Homonid is
https://www.newgrounds.com/portal/view/59593.
- url (str): The URL of the flash game. For example, the URL for Alien Homonid is
- Example parameters:
url = 'https://www.newgrounds.com/portal/view/59593'
- Example output with debug mode:
- NGScrape: Made request to
https://www.newgrounds.com/portal/view/59593and got status code200 - NGScrape: Found flash game link
https:\/\/uploads.ungrounded.net\/59000\/59593_alien_booya.swf?f1101313499
- NGScrape: Made request to
- Parameters:
- Scrape a flash game by url. Returns the URL for the swf.
scrape_desc(self, url: str) -> str- Scrape a flash game's description by url. Returns the description of the game.
- Parameters:
- url (str): The URL of the flash game. For example, the URL for Alien Homonid is
https://www.newgrounds.com/portal/view/59593.
- url (str): The URL of the flash game. For example, the URL for Alien Homonid is
- Example parameters:
url = 'https://www.newgrounds.com/portal/view/59593'
- Example output with debug mode:
- NGScrape: Made request to
https://www.newgrounds.com/portal/view/59593and got status code200 - NGScrape: Found game description "Blast FBI agents in this Metal Slug style shooter!"
- NGScrape: Made request to
- Parameters:
- Scrape a flash game's description by url. Returns the description of the game.
scrape_card(self, url: str) -> str- Scrape a flash game's card by url. Returns the URL of the card file.
- Parameters:
- url (str): The URL of the flash game. For example, the URL for Alien Homonid is
https://www.newgrounds.com/portal/view/59593.
- url (str): The URL of the flash game. For example, the URL for Alien Homonid is
- Example parameters:
url = 'https://www.newgrounds.com/portal/view/59593'
- Example output with debug mode:
- NGScrape: Made request to
https://www.newgrounds.com/portal/view/59593and got status code200 - NGScrape: Found card link
https://picon.ngfiles.com/59000/flash_59593_card.png?f1607717241
- NGScrape: Made request to
- Parameters:
- Scrape a flash game's card by url. Returns the URL of the card file.
scrape_title(self, url: str) -> str- Scrape a flash game's title with url. Returns title of the flash game.
- Parameters:
- url (str): The URL of the flash game. For example, the URL for Alien Homonid is
https://www.newgrounds.com/portal/view/59593.
- url (str): The URL of the flash game. For example, the URL for Alien Homonid is
- Example parameters:
url = 'https://www.newgrounds.com/portal/view/59593'
- Example output with debug mode:
- NGScrape: Made request to
https://www.newgrounds.com/portal/view/59593and got status code200 - NGScrape: Found game title "Alien Homonid"
- NGScrape: Made request to
- Parameters:
- Scrape a flash game's title with url. Returns title of the flash game.
Metadata
Release files for ngscrape 3.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ngscrape-3.0.3.tar.gz | 39.9 kB | Without provenance | Details for ngscrape-3.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ngscrape-3.0.3-py3-none-any.whl | Python 3 | none | any | Details for ngscrape-3.0.3-py3-none-any.whl |
Total release size: 68.1 kB
Release files / ngscrape-3.0.3.tar.gz
| Download URL | ngscrape-3.0.3.tar.gz |
|---|---|
| Size | 39.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22770a8830b72e2fdff071463a6e15f0f10feb7e26e73b1376225faef6dd0fb2
|
|
BLAKE2b-256 checksum How to use checksums |
a9e4071d890c4437aa55dd4f01711e88e0b6a0e69c60fb2bbf57e5100dfc24a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Release files / ngscrape-3.0.3-py3-none-any.whl
| Download URL | ngscrape-3.0.3-py3-none-any.whl |
|---|---|
| Size | 28.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
79291a3956de037d6db378aba403f09b9ff989a9e456947e5d5f9d4000743980
|
|
BLAKE2b-256 checksum How to use checksums |
26ec4eae12656a70aa9e40d8190d010c16872928f2376ba59c1741c03a134102
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Security for ngscrape 3.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.