Marketscrape / marketscrape

Marketscrape is a user-friendly web scraper for Facebook Marketplace that utilizes AI to help users assess the value of each listing. By providing real-time analysis and advanced machine learning algorithms, Marketscrape empowers users to make informed purchasing decisions and find the best deals on Facebook Marketplace.
MIT License
21 stars 3 forks source link

Attribute Error: 'NoneType' object has no attribute 'group' #69

Open MRasmussen2000 opened 1 year ago

MRasmussen2000 commented 1 year ago

Summary

This occurs when analyzing a link to an item. The analysis fails and then the user can not see any data or receive new information. The load out of the HTML is below. Suspected cause is the update of Facebook Marketplace inhibiting web scraping information.

Component Name

marketscrape/scraper/views.py

OS / Environment

Mac OS Visual Studio Code Docker Environment

Steps to Reproduce

Run the server and view the information on webpage. Link opens in Safari and copied Safari link pasted into box Analyze button is clicked and then it fails to run.

Expected Results

Expecting to see visual output with AI data and information.

Actual Results

Request Method: | POST
-- | --
http://127.0.0.1:8000/
4.2
AttributeError
'NoneType' object has no attribute 'group'
/workspaces/marketscrape/scraper/shop_class.py, line 61, in <listcomp>
scraper.views.Index
/usr/local/bin/python
3.10.11
['/workspaces/marketscrape',  '/usr/local/lib/python310.zip',  '/usr/local/lib/python3.10',  '/usr/local/lib/python3.10/lib-dynload',  '/usr/local/lib/python3.10/site-packages']
Mon, 05 Jun 2023 21:06:39 +0000

Code of Conduct

bhavanvir commented 11 months ago

Hey, sorry about the late reply, but thanks for taking the time to create an issue. This is most likely a problem with one of the regex capture groups. We'll get around to fixing this eventually, but feel free to try fixing it yourself and submitting a pull request with your changes!