Skip to main content

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
  • 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.
      • 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/59593 and got status code 200
        • NGScrape: Found flash game link https:\/\/uploads.ungrounded.net\/59000\/59593_alien_booya.swf?f1101313499
  • 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.
      • 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/59593 and got status code 200
        • NGScrape: Found game description "Blast FBI agents in this Metal Slug style shooter!"
  • 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.
      • 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/59593 and got status code 200
        • NGScrape: Found card link https://picon.ngfiles.com/59000/flash_59593_card.png?f1607717241
  • 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.
      • 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/59593 and got status code 200
        • NGScrape: Found game title "Alien Homonid"

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)

Source distribution for ngscrape 3.0.3
File Size Uploaded
ngscrape-3.0.3.tar.gz 39.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ngscrape 3.0.3
File Interpreter ABI Platform
ngscrape-3.0.3-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

3.0.3 This release

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page