Git Product home page Git Product logo

fiverr-scraping-api's Introduction

Fiverr API Scraper is a Python library that allows you to extract detailed information from Fiverr fluently without any restriction. It returns JSON responses and BS4-HTML-SOUP according to your will.

Features

  • Extract detailed information from Fiverr; gig, recommendations, profiles, bios and all.
  • No restrictions
  • ScraperAPI supported

Installation

You can install the Fiverr API Scraper using pip:

pip install fiverr-api

Usage

Below are examples of how to use the Fiverr API Scraper to extract data from Fiverr gig pages and user profiles.

Scrape Example

from fiverr_api import session

session.set_scraper_api_key("XYZ-SCRAPER_API_KEY")
response = session.get("https://www.fiverr.com/username/your-gig-slug") # your fiverr url should be here
json_data = response.props_json() # gives you JSON
print(response.soup) # gives you beautiful soup instance
# You can use `response.soup` to further extract your information. 

Get your ScraperAPI key here.

Project Structure

The Fiverr API Scraper is organized into several modules to enhance code readability and maintainability:

  • fiverr_api
    • __init__.py: For exporting session
  • fiverr_api.utils
    • req.py: Extending requests for Fiverr scraping
    • scrape_utils.py: Utilities for scraping

scraper.py gives you a function named get_perseus_initial_props() which returns the initial props of the Fiverr page. This function is used by the modules to extract initial JSON data.

License

GPL

Contributing

New pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Author

Check more of my projects.

fiverr-scraping-api's People

Contributors

bishwas-py avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fiverr-scraping-api's Issues

profile_scrape() doesn't work

Hi Bishwas,

Thank you so much for this package! I'm wiring b/c the scraper.profile_scrape() does not work even though I do exactly as the sample code said. The error message is:
AttributeError: 'NoneType' object has no attribute 'text'

And is seems that this line of code goes wrong:
bio = oneliner.find('small', {'class': 'oneliner'}).text

However, I wasn't able to find what was wrong with this script. Would you mind providing some clues?

Bests,
Rui

It seem not working

It seem not working because Fiverr.com detect it is not allowed

I run example code, and throw error:

File "/Users/heva/Desktop/research/fiverr/test.py", line 14, in <module> gig_data = scraper.gig_scrape(gig_url) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/fiverr_api.py", line 56, in gig_scrape categories_breadcrumbs_html UnboundLocalError: local variable 'categories_breadcrumbs_html' referenced before assignment

NonType object issue

Traceback (most recent call last):
File "/home/jay/.local/lib/python3.8/site-packages/fiverr_api.py", line 53, in gig_scrape
categories_breadcrumbs_html = gig_overview.find(
AttributeError: 'NoneType' object has no attribute 'find'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "fiverr.py", line 13, in
gig_data = scraper.gig_scrape(gig_url)
File "/home/jay/.local/lib/python3.8/site-packages/fiverr_api.py", line 56, in gig_scrape
categories_breadcrumbs_html
UnboundLocalError: local variable 'categories_breadcrumbs_html' referenced before assignment

New questions about profile_scrape

屏幕截图 2024-01-03 191850
屏幕截图 2024-01-03 191812
As shown in the figure above, I have set up the proxy, but there is still an error. I sincerely hope to get your correction, thank you very much!

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.